remove aurora clone after jupyter tests #444
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: | |
- '*' | |
pull_request: | |
branches: | |
- '*' | |
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.8", "3.9", "3.10", "3.11"] | |
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 Env | |
shell: bash | |
run: | | |
python --version | |
conda env create -f environment.yml | |
source activate mtpy-v2-test | |
pip install git+https://github.com/simpeg/pydiso.git | |
conda install pytest | |
conda install pytest-subtests | |
conda install pytest-cov | |
pip install git+https://github.com/kujaku11/mt_metadata.git@main | |
pip install git+https://github.com/kujaku11/mth5.git@master | |
pip install git+https://github.com/simpeg/aurora@main | |
git clone https://github.com/MTgeophysics/mtpy_data.git | |
cd mtpy_data | |
pip install -e . | |
cd .. | |
- name: Install Our Package | |
shell: bash | |
run: | | |
source activate mtpy-v2-test | |
pip install -e . | |
conda list | |
- name: Install Jupyter and dependencies | |
run: | | |
source activate mtpy-v2-test | |
pip install jupyter | |
pip install ipykernel | |
python -m ipykernel install --user --name mtpy-v2-test | |
# Install any other dependencies you need | |
- name: Execute Jupyter Notebooks | |
run: | | |
source activate mtpy-v2-test | |
git clone --single-branch --branch mtpy_tests https://github.com/simpeg/aurora | |
cd aurora | |
jupyter nbconvert --to notebook --execute docs/examples/dataset_definition.ipynb | |
# jupyter nbconvert --to notebook --execute docs/examples/operate_aurora.ipynb | |
#jupyter nbconvert --to notebook --execute docs/tutorials/pole_zero_fitting/lemi_pole_zero_fitting_example.ipynb | |
#jupyter nbconvert --to notebook --execute docs/tutorials/processing_configuration.ipynb | |
#jupyter nbconvert --to notebook --execute docs/tutorials/process_cas04_single_station.ipynb | |
#jupyter nbconvert --to notebook --execute docs/tutorials/synthetic_data_processing.ipynb | |
#jupyter nbconvert --to notebook --execute tests/test_run_on_commit.ipynb | |
cd ../ | |
rm -rf aurora | |
# Replace "notebook.ipynb" with your notebook's filename | |
- 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 | |