Skip to content

Test

Test #3022

Workflow file for this run

---
name: Test
# runs on a push on main and at the end of every day
on:
push:
branches:
- main
schedule:
- cron: "0 0 * * *"
# Required shell entrypoint to have properly configured bash shell
defaults:
run:
shell: pixi run bash -e {0}
jobs:
test:
runs-on: ${{ matrix.os }}
if: github.repository == 'ESMValGroup/ESMValTool' # avoid GAs in forks
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
environment: [test-py312, test-py313]
name: ${{ matrix.os }} ${{ matrix.environment }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: prefix-dev/setup-pixi@v0.9.5
with:
frozen: true
environments: ${{ matrix.environment }}
- name: Check dependencies are compatible
run: pip check
- name: Check code quality
run: pre-commit run -a
- name: Run tests
run: pytest -n 2 -m "not installation"
- name: Upload artifacts
if: ${{ always() }} # upload artifacts even if fail
uses: actions/upload-artifact@v7
with:
name: Test_reports_${{ matrix.os }}_${{ matrix.environment }}
path: test-reports
- name: Check the command line interface
run: |
esmvaltool version
esmvaltool -- --help
esmvaltool develop compare -- --help