CI (bleeding edge) #282
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: CI (bleeding edge) | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| paths: | |
| - .github/workflows/bleeding-edge.yaml | |
| schedule: | |
| # run this every Wednesday at 3 am UTC | |
| - cron: 0 3 * * 3 | |
| workflow_dispatch: | |
| permissions: {} | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| name: tests with bleeding-edge crucial deps (${{ matrix.python-version }}) | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: | |
| - '3.14' | |
| - 3.14t | |
| timeout-minutes: 60 | |
| concurrency: | |
| # auto-cancel any in-progress job *on the same branch* | |
| group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.python-version }} | |
| cancel-in-progress: true | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0 | |
| with: | |
| # numpy cp314 nightlies require at least 3.14.0b1, which is not available | |
| # via uv at the time of writing. | |
| python-version: ${{ matrix.python-version }} | |
| allow-prereleases: true | |
| - uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867 # v7.1.6 | |
| with: | |
| activate-environment: true | |
| - name: Configure uv | |
| run: | | |
| pin=${{ matrix.python-version }} | |
| echo "UV_PYTHON=${pin%-dev}" >> $GITHUB_ENV | |
| echo "UV_PYTHON_PREFERENCE=only-system" >> $GITHUB_ENV | |
| echo "UV_PRERELEASE=allow" >> $GITHUB_ENV | |
| echo "UV_INDEX=https://pypi.anaconda.org/scientific-python-nightly-wheels/simple" >> $GITHUB_ENV | |
| echo "UV_INDEX_STRATEGY=unsafe-best-match" >> $GITHUB_ENV | |
| - name: Install dependencies | |
| run: uv pip install --no-build setuptools numpy Cython | |
| - name: Build | |
| # --no-build-isolation is used to guarantee that build time dependencies | |
| # are not installed by pip as specified from pyproject.toml, hence we get | |
| # to use the dev version of numpy at build time. | |
| run: | | |
| uv pip install -e . --no-build-isolation --group test | |
| - run: uv pip list | |
| - if: ${{ endsWith( matrix.python-version , 't') }} | |
| run: | | |
| echo "PYTHON_GIL=0" >> $GITHUB_ENV | |
| - name: Run Tests | |
| run: pytest --color=yes | |
| create-issue: | |
| if: ${{ failure() && github.event_name == 'schedule' }} | |
| needs: [build] | |
| permissions: | |
| issues: write | |
| runs-on: ubuntu-latest | |
| name: Create issue on failure | |
| steps: | |
| - name: Create issue on failure | |
| uses: imjohnbo/issue-bot@572eed14422c4d6ca37e870f97e7da209422f5bd # v3.4.4 | |
| with: | |
| title: 'TST: Upcoming dependency test failures' | |
| body: | | |
| The weekly build with future dependencies has failed. Check the logs | |
| https://github.com/${{github.repository}}/actions/runs/${{github.run_id}} | |
| pinned: false | |
| close-previous: false | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |