Tests #440
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: Tests | |
on: | |
schedule: | |
- cron: '42 8 2-30/2 * *' # At 08:42 UTC on every 2nd day-of-month | |
push: | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
tests: | |
name: Tests on ${{ matrix.os }} Python-${{ matrix.python-version }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
python-version: ["3.9", "3.13"] # run lower and upper versions | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Python ${{ matrix.python-version }} | |
uses: astral-sh/setup-uv@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install MinGW-w64 tools (Windows) | |
if: runner.os == 'Windows' | |
uses: msys2/setup-msys2@v2 | |
with: | |
msystem: MINGW64 | |
path-type: inherit | |
install: >- | |
mingw-w64-x86_64-gcc-fortran | |
mingw-w64-x86_64-lapack | |
mingw-w64-x86_64-meson | |
mingw-w64-x86_64-ninja | |
- name: Install GCC Fortran (macOS) | |
if: runner.os == 'macOS' | |
uses: fortran-lang/setup-fortran@v1 | |
with: | |
compiler: gcc | |
version: 13 | |
- name: Install build requirements | |
run: uv pip install meson ninja | |
- name: Build pestutils (Windows) | |
if: runner.os == 'Windows' | |
shell: msys2 {0} | |
env: | |
LDFLAGS: -static-libgcc -static-libgfortran -static-libquadmath -Wl,-Bstatic,--whole-archive -lwinpthread -Wl,--no-whole-archive | |
run: bash scripts/build_lib.sh | |
- name: Build pestutils (non-Windows) | |
if: runner.os != 'Windows' | |
run: bash scripts/build_lib.sh | |
- name: Install package and all extras | |
run: uv sync --all-extras | |
- name: Run tests | |
run: uv run pytest -v | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |