Skip to content

Commit

Permalink
🌱 Run lint in a separate ci job
Browse files Browse the repository at this point in the history
Before this commit, the linting was done in the test matrix (once per python
version). This is not necessary, as the linting is the same for all versions.

Now, the linting is fully delegated to pre-commit, and executed as a separate
job.
  • Loading branch information
ivantodorovich committed Apr 27, 2024
1 parent 20122da commit 5908c29
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 12 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@ on:
- cron: "0 0 * * 1"

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.10
- uses: pre-commit/[email protected]

test:
runs-on: ubuntu-latest
strategy:
Expand Down Expand Up @@ -40,8 +49,6 @@ jobs:
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: pip install -r requirements-tests.txt
- name: Lint
run: bash scripts/lint.sh
- run: mkdir coverage
- run: bash ./scripts/test-files.sh
- name: Test
Expand Down
2 changes: 0 additions & 2 deletions requirements-tests.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,3 @@ pytest-cov >=2.10.0,<5.0.0
coverage[toml] >=6.2,<8.0
pytest-xdist >=1.32.0,<4.0.0
pytest-sugar >=0.9.4,<0.10.0
mypy ==1.4.1
ruff ==0.2.0
8 changes: 0 additions & 8 deletions scripts/lint.sh

This file was deleted.

0 comments on commit 5908c29

Please sign in to comment.