Set measurement azimuth and update TF read options in tests #288
Workflow file for this run
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: Testing | |
| on: | |
| push: | |
| branches: | |
| - '*' | |
| pull_request: | |
| branches: | |
| - '*' | |
| jobs: | |
| setup-build: | |
| name: Ex1 (${{ matrix.python-version }}, ${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| defaults: | |
| run: | |
| shell: bash | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: ["ubuntu-latest"] | |
| python-version: ["3.10", "3.11", "3.12"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v3 | |
| with: | |
| version: "latest" | |
| - name: Set up Python ${{ matrix.python-version }} | |
| run: uv python install ${{ matrix.python-version }} | |
| - name: Cache MTH5 test files | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/aurora | |
| key: mth5-test-files-${{ runner.os }}-${{ hashFiles('tests/conftest.py') }} | |
| restore-keys: | | |
| mth5-test-files-${{ runner.os }}- | |
| - name: Create virtual environment and install dependencies | |
| run: | | |
| uv venv --python ${{ matrix.python-version }} | |
| uv pip install -e ".[dev,test]" | |
| uv pip install "mt_metadata[obspy] @ git+https://github.com/kujaku11/mt_metadata.git@pydantic" | |
| uv pip install git+https://github.com/kujaku11/mth5.git@old_pydantic | |
| uv pip install git+https://github.com/kujaku11/mth5_test_data.git | |
| uv pip install jupyter ipykernel pytest pytest-cov pytest-timeout codecov | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y pandoc | |
| # - name: Execute Jupyter Notebooks | |
| # run: | | |
| # source .venv/bin/activate | |
| # python -m ipykernel install --user --name aurora-test | |
| # 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/pkd_units_check.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_multiple_station.ipynb | |
| # jupyter nbconvert --to notebook --execute docs/tutorials/synthetic_data_processing.ipynb | |
| - name: Run Tests | |
| run: | | |
| source .venv/bin/activate | |
| pytest -s -v --cov=./ --cov-report=xml --cov=aurora -n 4 tests | |
| # - name: Run Slow Tests | |
| # run: | | |
| # source .venv/bin/activate | |
| # pytest -s -v --cov=./ --cov-report=xml --cov-append --cov=aurora -n 4 -m "slow" --durations=20 --durations-min=1.0 tests | |
| # # pytest -s -v tests/synthetic/test_fourier_coefficients.py | |
| # # pytest -s -v tests/config/test_config_creator.py | |
| - name: "Upload coverage reports to Codecov" | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| fail_ci_if_error: false | |
| flags: tests | |
| - name: Build Doc | |
| if: ${{ (github.ref == 'refs/heads/main') && (matrix.python-version == '3.8')}} | |
| run: | | |
| source .venv/bin/activate | |
| cd docs | |
| make html | |
| cd .. | |
| - name: GitHub Pages | |
| if: ${{ (github.ref == 'refs/heads/main') && (matrix.python-version == '3.8')}} | |
| uses: crazy-max/ghaction-github-pages@v2.5.0 | |
| with: | |
| build_dir: docs/_build/html | |
| # Write the given domain name to the CNAME file | |
| # fqdn: aurora.simpeg.xyz | |
| # Allow Jekyll to build your site | |
| jekyll: false # optional, default is true | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |