diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 5e9b164a..ba8fb39f 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -5,26 +5,11 @@ on: - cron: "5 3 * * 2" jobs: - build-cache-env: - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] - steps: - - uses: khanlab/actions/.github/actions/action-setup_task-installPyProject@v0.3.3 - id: setup - with: - python-version: ${{ matrix.python-version }} - - name: setup docker - uses: ./.github/actions/build-test-container - with: - python-version: ${{ steps.setup.outputs.python-version }} - calibrate-timings: runs-on: ubuntu-latest - needs: ["build-cache-env"] permissions: pull-requests: write + contents: write steps: - name: install @@ -76,3 +61,60 @@ jobs: body: | The number of tests has changed since the last generated test-timings file. This PR contains an automatically regenerated file. + + build-cache-env: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + steps: + - uses: khanlab/actions/.github/actions/action-setup_task-installPyProject@v0.3.4 + id: setup + with: + python-version: ${{ matrix.python-version }} + cache-key: pypi + install-deps-only: dev + install-library: false + + - name: build docker test container + uses: ./.github/actions/build-test-container + with: + python-version: ${{ steps.setup.outputs.python-version }} + load: true + + - name: install lib + run: poetry run pip install . + + test: + runs-on: ubuntu-latest + needs: [ 'build-cache-env' ] + strategy: + matrix: + python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] + split: ['1', '2', '3', '4', '5'] + fail-fast: false + steps: + - uses: khanlab/actions/.github/actions/action-setup_task-installPyProject@v0.3.4 + id: setup + with: + python-version: ${{ matrix.python-version }} + cache-key: nightly + install-deps-only: dev + install-library: false + + - name: install lib + run: poetry run pip install . + + - name: build docker test container + uses: ./.github/actions/build-test-container + with: + python-version: ${{ steps.setup.outputs.python-version }} + load: true + + - name: Test with pytest + env: + HYPOTHESIS_PROFILE: pr + run: >- + poetry run pytest -n auto --splits 5 --group ${{ matrix.split }} + --doctest-modules --ignore=docs + --ignore=snakebids/project_template --benchmark-disable