Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .github/workflows/precommit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: precommit and devops tests

defaults:
run:
shell: bash

env:
# common options for pytest
pytest_options: "--durations=10 -v -s -We -p no:unraisableexception"

on:
push:
branches: [ main ]
paths: ['docs/**', '**.md']
pull_request:
branches: [ main ]
schedule:
- cron: '0 13 * * 4'

jobs:
precommit:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4.1.6
- uses: actions/setup-python@v5.0.0
with:
python-version: 3.9
- run: |
pip install pre-commit
pre-commit clean
pre-commit autoupdate
pre-commit run --all-files
- if: ${{ failure() }}
run: git diff

devops:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4.1.6
with:
submodules: recursive
fetch-depth: 0 # https://github.com/pypa/setuptools_scm/issues/480
- run: pip install -r tests/devops_tests/requirements.txt
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: pytest ${{ env.pytest_options }} -k "not test_run_notebooks" tests/devops_tests
30 changes: 3 additions & 27 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,13 @@ env:
on:
push:
branches: [ main ]
paths-ignore: ['docs/**', '**.md']
pull_request:
branches: [ main ]
schedule:
- cron: '0 13 * * 4'

jobs:
precommit:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4.1.6
- uses: actions/setup-python@v5.0.0
with:
python-version: 3.9
- run: |
pip install pre-commit
pre-commit clean
pre-commit autoupdate
pre-commit run --all-files
- if: ${{ failure() }}
run: git diff

pylint:
runs-on: ubuntu-24.04
steps:
Expand Down Expand Up @@ -64,20 +50,10 @@ jobs:
# TODO #682
nbqa pylint --unsafe-load-any-extension=y --disable=fixme,duplicate-code,invalid-name,trailing-whitespace,line-too-long,missing-function-docstring,wrong-import-position,missing-module-docstring,wrong-import-order,ungrouped-imports,no-member,too-many-locals,unnecessary-lambda-assignment $(git ls-files '*.ipynb')

devops:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4.1.6
with:
submodules: recursive
fetch-depth: 0 # https://github.com/pypa/setuptools_scm/issues/480
- run: pip install -r tests/devops_tests/requirements.txt
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: pytest ${{ env.pytest_options }} -k "not test_run_notebooks" tests/devops_tests


nojit_and_codecov:
needs: [precommit, pylint, devops]
needs: [pylint]
runs-on: ubuntu-24.04
env:
NUMBA_DISABLE_JIT: 1
Expand Down
Loading