Skip to content

mf6adj continuous integration #977

mf6adj continuous integration

mf6adj continuous integration #977

Workflow file for this run

name: mf6adj continuous integration
on:
schedule:
- cron: '0 8 * * *' # run at 8 AM UTC (12 AM PST, 8 PM NZST)
push:
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build
runs-on: ubuntu-latest
defaults:
run:
shell: bash
timeout-minutes: 10
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup Python
uses: astral-sh/setup-uv@v5
with:
enable-cache: false
- name: Build package
run: uv build
- name: Check package
run: uvx twine check --strict dist/*
lint:
name: Lint
runs-on: ubuntu-latest
defaults:
run:
shell: bash
timeout-minutes: 10
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup Python
uses: astral-sh/setup-uv@v5
with:
enable-cache: false
- name: Lint
run: uvx ruff check
- name: Check format
run: uvx ruff format --check
- name: Check spelling
run: uvx codespell
mf6adjCI:
name: autotest
needs: lint
runs-on: ${{ matrix.os }}
timeout-minutes: 120
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
#python-version: [3.8, 3.9, "3.10", "3.11"]
python-version: ["3.10"]
run-type: [std]
test-path: ["."]
#include:
# - os: macos-latest
# python-version: 3.9
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout repo
uses: actions/checkout@v3 # checksout this repo
# Setup conda env
- name: Install Conda environment using micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-file: environment.yml
environment-name: mf6adj
cache-downloads: false
create-args: |
python=${{ matrix.python-version }}
- name: Install executables
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
get-modflow --subset mf6,libmf6,gridgen :python
- name: Autotest ${{ matrix.os }}-python${{ matrix.python-version }}
working-directory: ./autotest
run: |
pytest -v -n=auto --durations=0
- name: Test notebooks ${{ matrix.os }}-python${{ matrix.python-version }}
working-directory: ./examples
run: |
pytest -v -n=auto --durations=0 --nbmake --nbmake-timeout=3000