test on nightly dependencies #27
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
| --- | |
| # Run test suite using the nightly release of Nilearn dependencies. | |
| # | |
| # When running on `main`, if the workflow fails the action will open an issue | |
| # using this issue `template <https://github.com/nilearn/nilearn/blob/main/.github/nightly_failure.md>`_. | |
| ### | |
| name: test on nightly dependencies | |
| on: | |
| schedule: | |
| # Uses the cron schedule for github actions | |
| # https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#schedule | |
| # Run every Monday at midnight UTC | |
| # ┌───────────── minute (0 - 59) | |
| # │ ┌───────────── hour (0 - 23) | |
| # │ │ ┌───────────── day of the month (1 - 31) | |
| # │ │ │ ┌───────────── month (1 - 12 or JAN-DEC) | |
| # │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT) | |
| # │ │ │ │ │ | |
| # │ │ │ │ │ | |
| # │ │ │ │ │ | |
| # * * * * * | |
| - cron: 0 0 * * 1 | |
| # This enables manual triggering from GitHub UI | |
| # https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#workflow_dispatch | |
| workflow_dispatch: | |
| # Force to use color | |
| env: | |
| FORCE_COLOR: true | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| nightly: | |
| # This prevents this workflow from running on a fork. | |
| # To test this workflow on a fork, uncomment the following line. | |
| if: github.repository == 'nilearn/nilearn' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout nilearn | |
| uses: actions/checkout@v6 | |
| with: | |
| # If pull request, checkout HEAD commit with all commit history | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| - name: Install the latest version of uv | |
| uses: astral-sh/setup-uv@v7 | |
| - name: Setup python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: 3.14 | |
| allow-prereleases: true | |
| - name: Install tox | |
| run: uv tool install tox --with=tox-uv --with=tox-gh-actions | |
| - name: Run test suite | |
| id: nightly | |
| continue-on-error: true | |
| run: | | |
| tox run --list-dependencies -e nightly -- nilearn | |
| tox run -e plot_test_timing | |
| - name: Upload test report | |
| if: success() || failure() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: nightly_report.html | |
| path: report.html | |
| - name: Upload test timings | |
| if: success() || failure() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: pytest_output | |
| path: results/pytest_output | |
| - name: Create issue | |
| if: ${{ steps.nightly.outcome != 'success' }} | |
| uses: JasonEtco/create-an-issue@v2.9.2 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run_id: ${{ github.run_id }} | |
| repository: ${{ github.repository }} | |
| workflow_name: NIGHTLY DEPENDENCIES TEST | |
| with: | |
| filename: .github/workflow_failure.md | |
| update_existing: true | |
| search_existing: open | |
| - name: Return failure | |
| if: ${{ steps.nightly.outcome != 'success' }} | |
| run: exit 1 |