Skip to content

Monitor Tests

Monitor Tests #2552

---
name: Monitor Tests
permissions: {}
on:
push:
branches:
- main
# run the test only if the PR is to main
# turn it on if required
# pull_request:
# branches:
# - main
schedule:
- cron: "0 0 * * *" # nightly
# Required shell entrypoint to have properly configured bash shell
defaults:
run:
shell: pixi run bash -e {0}
jobs:
linux:
runs-on: "ubuntu-latest"
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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
persist-credentials: false
- uses: prefix-dev/setup-pixi@1b2de7f3351f171c8b4dfeb558c639cb58ed4ec0 # v0.9.5
with:
frozen: true
environments: ${{ matrix.environment }}
- name: Install pytest-monitor
run: pip install pytest-monitor
- name: Run tests
run: pytest -n 2 -m "not installation" --db ../.pymon
- name: Parse monitor information
run: python tests/parse_pymon.py
- name: Upload artifacts
if: ${{ always() }} # upload artifacts even if fail
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: Test_reports_${{ matrix.os }}_${{ matrix.environment }}
path: test-reports