Skip to content

Commit

Permalink
add separate workflow for checks
Browse files Browse the repository at this point in the history
  • Loading branch information
xoudini committed Oct 21, 2024
1 parent 74615ce commit dc68a44
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 5 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: checks

on:
push:
branches: [master]
pull_request:
branches: [master]

concurrency:
group: checks-${{ github.head_ref }}
cancel-in-progress: true

env:
PYTHONUNBUFFERED: "1"
FORCE_COLOR: "1"

jobs:
run:
name: Run checks [Python ${{ matrix.python-version }}]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install Hatch
run: pip install --upgrade hatch

- name: Linting
run: hatch fmt --check

- name: Type checking
run: hatch run types:check
7 changes: 2 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: test

on:
push:
branches: [main, master]
branches: [master]
pull_request:
branches: [main, master]
branches: [master]

concurrency:
group: test-${{ github.head_ref }}
Expand Down Expand Up @@ -48,9 +48,6 @@ jobs:
- name: Install Hatch
run: pip install --upgrade hatch

- name: Run static analysis
run: hatch fmt --check

- name: Run tests
run: hatch test --python ${{ matrix.python-version }} --cover --randomize --parallel --retries 2 --retry-delay 1
env:
Expand Down

0 comments on commit dc68a44

Please sign in to comment.