Morrigan nightly #25
This file contains hidden or 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: Morrigan nightly | |
| on: | |
| schedule: | |
| # 03:00 UTC daily. | |
| - cron: '0 3 * * *' | |
| # Manual trigger for ad-hoc runs via | |
| # ``gh workflow run "Morrigan nightly" -r <branch>``. | |
| workflow_dispatch: | |
| # Least-privilege token: only read access to the repo contents. | |
| # Coverage upload uses the CODECOV_TOKEN secret directly, not the | |
| # default GITHUB_TOKEN. | |
| permissions: | |
| contents: read | |
| # Nightly: full test suite (unit + smoke + integration + slow) with | |
| # coverage instrumentation. The PR gate runs only the unit + smoke | |
| # tiers; the integration and slow tiers run seed-ensemble statistics | |
| # over many full-system runs. | |
| # Coverage is reported to the Codecov dashboard via codecov-action. | |
| jobs: | |
| nightly: | |
| name: Morrigan-nightly (ubuntu-latest) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Python 3.11 | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.11' | |
| - name: Install Morrigan | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install ".[develop]" | |
| - name: Run unit + smoke + integration + slow tests with coverage | |
| run: | | |
| FULL_FAIL_UNDER=$(python -c "import tomllib; print(tomllib.load(open('pyproject.toml','rb'))['tool']['coverage']['report']['fail_under'])") | |
| echo "Full gate fail_under: ${FULL_FAIL_UNDER}%" | |
| pytest -m "(unit or smoke or integration or slow) and not skip" \ | |
| --cov=morrigan \ | |
| --cov-report=term-missing \ | |
| --cov-report=xml \ | |
| --cov-fail-under=${FULL_FAIL_UNDER} | |
| - name: Upload coverage to Codecov | |
| if: ${{ !cancelled() }} | |
| uses: codecov/codecov-action@v6 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| slug: FormingWorlds/Morrigan | |
| files: coverage.xml | |
| flags: nightly | |
| fail_ci_if_error: false |