remove pdb line #309
Workflow file for this run
This file contains 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: CI | |
on: | |
push: | |
paths-ignore: | |
- '**.md' | |
- '.github/workflows/release.yml' | |
- '.gitignore' | |
pull_request: | |
branches: | |
- main | |
- develop | |
paths-ignore: | |
- '**.md' | |
- '.github/workflows/release.yml' | |
- '.gitignore' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Setup uv | |
uses: astral-sh/setup-uv@v5 | |
with: | |
version: "0.5.18" | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version-file: pyproject.toml | |
- name: Install project | |
run: uv sync --group lint | |
- name: Run ruff check | |
run: uv run ruff check | |
- name: Run ruff format | |
run: uv run ruff format --check | |
- name: Check spelling | |
run: uv run codespell | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
- name: Setup uv | |
uses: astral-sh/setup-uv@v5 | |
with: | |
version: "0.5.18" | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version-file: pyproject.toml | |
- name: Install project | |
run: uv sync --group build | |
- name: Print package version | |
run: uv run python -c "import modflow_devtools; print(modflow_devtools.__version__)" | |
- name: Build package | |
run: uv run python -m build | |
- name: Check distribution | |
run: uv run twine check --strict dist/* | |
test: | |
name: Test | |
needs: | |
- build | |
- lint | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ ubuntu-22.04, macos-13, windows-2022 ] | |
python: [ 3.9, "3.10", "3.11", "3.12", "3.13" ] | |
env: | |
GCC_V: 11 | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
with: | |
path: modflow-devtools | |
- name: Checkout modflow6 | |
uses: actions/checkout@v4 | |
with: | |
repository: MODFLOW-USGS/modflow6 | |
path: modflow6 | |
- name: Checkout modflow6 examples | |
uses: actions/checkout@v4 | |
with: | |
repository: MODFLOW-USGS/modflow6-examples | |
path: modflow6-examples | |
- name: Checkout modflow6 test models | |
uses: actions/checkout@v3 | |
with: | |
repository: MODFLOW-USGS/modflow6-testmodels | |
path: modflow6-testmodels | |
- name: Checkout modflow6 large test models | |
uses: actions/checkout@v3 | |
with: | |
repository: MODFLOW-USGS/modflow6-largetestmodels | |
path: modflow6-largetestmodels | |
- name: Install executables | |
uses: modflowpy/install-modflow-action@v1 | |
- name: Install nightly build | |
uses: modflowpy/install-modflow-action@v1 | |
with: | |
repo: modflow6-nightly-build | |
- name: Setup GNU Fortran ${{ env.GCC_V }} | |
uses: awvwgk/setup-fortran@main | |
with: | |
compiler: gcc | |
version: ${{ env.GCC_V }} | |
- name: Setup uv | |
uses: astral-sh/setup-uv@v5 | |
with: | |
version: "0.5.18" | |
python-version: ${{ matrix.python }} | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version-file: modflow-devtools/pyproject.toml | |
- name: Install project | |
working-directory: modflow-devtools | |
run: uv sync --all-extras | |
- name: Cache modflow6 examples | |
id: cache-examples | |
uses: actions/cache@v3 | |
with: | |
path: modflow6-examples/examples | |
key: modflow6-examples-${{ hashFiles('modflow6-examples/data/**') }} | |
- name: Install extra Python packages | |
working-directory: modflow6-examples/etc | |
run: | | |
uv pip install -r requirements.pip.txt | |
uv pip install -r requirements.usgs.txt | |
- name: Update FloPy packages | |
run: uv run python -m flopy.mf6.utils.generate_classes --ref develop --no-backup | |
- name: Build modflow6 example models | |
if: steps.cache-examples.outputs.cache-hit != 'true' | |
working-directory: modflow6-examples/autotest | |
run: uv run pytest -v -n auto test_scripts.py --init | |
- name: Run local tests | |
working-directory: modflow-devtools/autotest | |
env: | |
REPOS_PATH: ${{ github.workspace }} | |
# use --dist loadfile to so tests requiring pytest-virtualenv run on the same worker | |
run: uv run pytest -v -n auto --dist loadfile --durations 0 --ignore test_download.py | |
- name: Run network-dependent tests | |
# only invoke the GH API on one OS and Python version | |
# to avoid rate limits (1000 rqs / hour / repository) | |
# https://docs.github.com/en/actions/learn-github-actions/usage-limits-billing-and-administration#usage-limits | |
if: runner.os == 'Linux' && matrix.python == '3.9' | |
working-directory: modflow-devtools/autotest | |
env: | |
REPOS_PATH: ${{ github.workspace }} | |
GITHUB_TOKEN: ${{ github.token }} | |
run: uv run pytest -v -n auto --durations 0 test_download.py | |
rtd: | |
name: Docs | |
needs: test | |
runs-on: ubuntu-22.04 | |
if: github.repository_owner == 'MODFLOW-USGS' && github.event_name == 'push' | |
steps: | |
- name: Trigger RTD | |
uses: dfm/rtds-action@v1 | |
with: | |
webhook_url: ${{ secrets.RTDS_WEBHOOK_URL }} | |
webhook_token: ${{ secrets.RTDS_WEBHOOK_TOKEN }} | |
commit_ref: ${{ github.ref }} |