|
| 1 | +name: Integration tests |
| 2 | + |
| 3 | +on: |
| 4 | + # Allow manual triggering of this workflow |
| 5 | + workflow_dispatch: |
| 6 | + # Run on each push to main and tagged version |
| 7 | + push: |
| 8 | + branches: [main] |
| 9 | + tags: ['v*'] |
| 10 | + # Runs every day at 2:15am (UTC) (~ midday in AEST) |
| 11 | + schedule: |
| 12 | + - cron: '2 15 * * *' |
| 13 | + |
| 14 | +jobs: |
| 15 | + tests: |
| 16 | + # These tests are also run on each push to main and tagged version via the `ci` workflow |
| 17 | + if: github.event_name != 'push' |
| 18 | + strategy: |
| 19 | + fail-fast: false |
| 20 | + matrix: |
| 21 | + os: [ "ubuntu-latest" ] |
| 22 | + python-version: [ "3.10", "3.11", "3.12", "3.13" ] |
| 23 | + runs-on: "${{ matrix.os }}" |
| 24 | + defaults: |
| 25 | + run: |
| 26 | + shell: bash |
| 27 | + steps: |
| 28 | + - name: Check out repository |
| 29 | + uses: actions/checkout@v4 |
| 30 | + - uses: ./.github/actions/setup |
| 31 | + with: |
| 32 | + python-version: ${{ matrix.python-version }} |
| 33 | + - name: Run tests |
| 34 | + run: | |
| 35 | + make fetch-test-data |
| 36 | + make test |
| 37 | + tests-slow: |
| 38 | + env: |
| 39 | + REF_TEST_OUTPUT: "test-outputs" |
| 40 | + strategy: |
| 41 | + fail-fast: false |
| 42 | + matrix: |
| 43 | + os: [ "ubuntu-latest" ] |
| 44 | + python-version: [ "3.10" ] |
| 45 | + runs-on: "${{ matrix.os }}" |
| 46 | + defaults: |
| 47 | + run: |
| 48 | + shell: bash |
| 49 | + steps: |
| 50 | + - name: Check out repository |
| 51 | + uses: actions/checkout@v4 |
| 52 | + - uses: ./.github/actions/setup |
| 53 | + with: |
| 54 | + python-version: ${{ matrix.python-version }} |
| 55 | + - name: Run tests |
| 56 | + run: | |
| 57 | + make fetch-test-data |
| 58 | + uv run python scripts/fetch-ilamb-data.py ilamb.txt |
| 59 | + make test-integration-slow |
| 60 | + # Upload the scratch and results directories as artifacts |
| 61 | + - name: Upload scratch artifacts |
| 62 | + uses: actions/upload-artifact@v4 |
| 63 | + if: always() |
| 64 | + with: |
| 65 | + name: integration-output-${{ matrix.python-version }} |
| 66 | + path: ${{ env.REF_TEST_OUTPUT }} |
| 67 | + retention-days: 7 |
0 commit comments