diff --git a/.github/workflows/array-api.yml b/.github/workflows/array-api.yml index fefe240..0c50225 100644 --- a/.github/workflows/array-api.yml +++ b/.github/workflows/array-api.yml @@ -1,5 +1,9 @@ name: Array API coverage tests -on: [push] + +on: + push: {} # Run on all branches + schedule: + - cron: '0 0 * * *' # Runs daily at 00:00 UTC # Automatically stop old builds on the same branch/PR concurrency: @@ -23,8 +27,12 @@ jobs: uses: prefix-dev/setup-pixi@ba3bb36eb2066252b2363392b7739741bb777659 - name: Install repository run: pixi run postinstall - - name: Run Array API tests + - name: Run Array API tests (Scheduled) + if: ${{ github.event_name == 'schedule' }} run: pixi run arrayapitests + - name: Run Array API tests (Push) + if: ${{ github.event_name == 'push' }} + run: pixi run arrayapitests --max-examples 16 --hypothesis-seed=0 - name: Upload Array API tests report uses: actions/upload-artifact@v4 with: diff --git a/README.md b/README.md index cc93e55..41efaf8 100644 --- a/README.md +++ b/README.md @@ -106,3 +106,9 @@ Run the tests with: ```bash pixi run arrayapitests ``` + +Or for a faster feedback cycle, with a fixed seed: + +```bash +pixi run arrayapitests --max-examples 16 --hypothesis-seed=0 +``` diff --git a/pixi.toml b/pixi.toml index 0aee9f7..3a16c4b 100644 --- a/pixi.toml +++ b/pixi.toml @@ -49,7 +49,7 @@ test = "pytest" test-coverage = "pytest --cov=ndonnx --cov-report=xml --cov-report=term-missing" [feature.test.tasks.arrayapitests] -cmd = "pytest --max-examples 16 api-coverage-tests/array_api_tests/ -v -rfX --json-report --json-report-file=api-coverage-tests.json -n auto --disable-deadline --disable-extension linalg --skips-file=skips.txt --xfails-file=xfails.txt --hypothesis-seed=0" +cmd = "pytest api-coverage-tests/array_api_tests/ -v -rfX --json-report --json-report-file=api-coverage-tests.json -n auto --disable-deadline --disable-extension linalg --skips-file=skips.txt --xfails-file=xfails.txt" [feature.test.tasks.arrayapitests.env] ARRAY_API_TESTS_MODULE = "ndonnx" ARRAY_API_TESTS_VERSION = "2023.12"