Skip to content

Commit

Permalink
Add workflow for linting / code style (#97)
Browse files Browse the repository at this point in the history
* Add CI for linting / code style

* Test for python 3.12
  • Loading branch information
stefsmeets authored Oct 25, 2024
1 parent efde4df commit d71f4f7
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
33 changes: 33 additions & 0 deletions .github/workflows/code-style.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Code style

on:
push:
branches:
- main
pull_request:
branches:
- main
types:
- opened
- reopened
- synchronize
- ready_for_review
workflow_dispatch:

jobs:
codestyle:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v45

- name: Run Pre-Commit
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
uses: pre-commit/[email protected]
with:
extra_args: --files $ALL_CHANGED_FILES
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']

steps:
- uses: actions/checkout@v3
Expand Down

0 comments on commit d71f4f7

Please sign in to comment.