Update testing_pip_import.yml #4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: TestingInConda | |
on: | |
push: | |
branches: | |
- 'main' | |
jobs: | |
setup-build: | |
name: Ex1 (${{ matrix.python-version }}, ${{ matrix.os }}) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ["ubuntu-latest"] | |
python-version: ["3.10"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Conda | |
uses: s-weigand/setup-conda@v1 | |
with: | |
update-conda: false | |
conda-channels: conda-forge | |
python-version: ${{ matrix.python-version }} | |
- name: Install Packages | |
shell: bash | |
run: | | |
python --version | |
conda create -n mtpy-v2-test python=${{ matrix.python-version }} | |
source activate mtpy-v2-test | |
pip install mtpy-v2 | |
conda install pytest | |
conda install pytest-subtests | |
conda install pytest-cov | |
git clone https://github.com/kujaku11/mt_metadata.git | |
cd mt_metadata | |
pip install -e . | |
cd .. | |
git clone https://github.com/kujaku11/mth5.git | |
cd mth5 | |
pip install -e . | |
cd .. | |
git clone https://github.com/simpeg/aurora | |
cd aurora | |
pip install -e . | |
cd .. | |
git clone https://github.com/MTgeophysics/mtpy_data.git | |
cd mtpy_data | |
pip install -e . | |
cd .. | |
conda list | |
- name: Run Tests | |
shell: bash | |
run: | | |
source activate mtpy-v2-test | |
pytest -rA --cov=./ --cov-report=xml --cov=mtpy | |
- name: "Upload coverage to Codecov" | |
uses: codecov/codecov-action@v3 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
with: | |
fail_ci_if_error: false | |
verbose: true | |
flags: tests | |