Skip to content

changed default of None to 1 #249

changed default of None to 1

changed default of None to 1 #249

Workflow file for this run

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: 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@pydantic
uv pip install jupyter ipykernel pytest pytest-cov 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
# 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 }}