|
| 1 | +name: Prerelease tests |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - ci/prerelease |
| 7 | + schedule: |
| 8 | + - cron: '0 0 * * 1' |
| 9 | + # Allow job to be triggered manually from GitHub interface |
| 10 | + workflow_dispatch: |
| 11 | + |
| 12 | +defaults: |
| 13 | + run: |
| 14 | + shell: bash |
| 15 | + |
| 16 | +# Force tox and pytest to use color |
| 17 | +env: |
| 18 | + FORCE_COLOR: true |
| 19 | + |
| 20 | +concurrency: |
| 21 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 22 | + cancel-in-progress: true |
| 23 | + |
| 24 | +permissions: |
| 25 | + contents: read |
| 26 | + |
| 27 | +jobs: |
| 28 | + test: |
| 29 | + runs-on: ${{ matrix.os }} |
| 30 | + strategy: |
| 31 | + fail-fast: false |
| 32 | + matrix: |
| 33 | + os: [ubuntu-latest, macos-latest, windows-latest] |
| 34 | + python-version: ['3.12', '3.13', '3.14'] |
| 35 | + |
| 36 | + env: |
| 37 | + DEPENDS: pre |
| 38 | + |
| 39 | + steps: |
| 40 | + - uses: actions/checkout@v6 |
| 41 | + with: |
| 42 | + submodules: true |
| 43 | + lfs: true |
| 44 | + |
| 45 | + - name: Set git name/email |
| 46 | + run: | |
| 47 | + git config --global user.email "bids.maintenance@gmail.com" |
| 48 | + git config --global user.name "bids-maintenance" |
| 49 | +
|
| 50 | + - name: Install the latest version of uv |
| 51 | + uses: astral-sh/setup-uv@v7 |
| 52 | + with: |
| 53 | + python-version: ${{ matrix.python-version }} |
| 54 | + |
| 55 | + - name: Install git-annex |
| 56 | + run: uv tool install git-annex |
| 57 | + |
| 58 | + - name: Show software versions |
| 59 | + run: | |
| 60 | + python -c "import sys; print(sys.version)" |
| 61 | + git annex version |
| 62 | +
|
| 63 | + - name: Install tox |
| 64 | + run: | |
| 65 | + uv tool install --with=tox-uv --with=tox-gh-actions tox |
| 66 | + - name: Show tox config |
| 67 | + run: tox c |
| 68 | + - name: Setup test suite |
| 69 | + run: tox run -vv --notest |
| 70 | + - name: Run test suite |
| 71 | + id: pre |
| 72 | + run: tox -v --skip-pkg-install --exit-and-dump-after 1200 |
| 73 | + - uses: codecov/codecov-action@v5 |
| 74 | + if: ${{ always() }} |
| 75 | + with: |
| 76 | + token: ${{ secrets.CODECOV_TOKEN }} |
| 77 | + - name: Create issue |
| 78 | + # Workflows triggered by schedule only notify the workflow creator |
| 79 | + # So let's open an issue to make sure this is visible to all |
| 80 | + if: ${{ steps.pre.outcome != 'success' }} |
| 81 | + uses: JasonEtco/create-an-issue@v2.9.2 |
| 82 | + env: |
| 83 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 84 | + run_id: ${{ github.run_id }} |
| 85 | + repository: ${{ github.repository }} |
| 86 | + workflow_name: PRE-RELEASE TESTS |
| 87 | + with: |
| 88 | + filename: .github/workflow_failure.md |
| 89 | + update_existing: true |
| 90 | + search_existing: open |
| 91 | + - name: Return failure |
| 92 | + if: ${{ steps.pre.outcome != 'success' }} |
| 93 | + run: exit 1 |
0 commit comments