Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Adding CI check for linted files. If a PR is open with code that … #4

Merged
merged 1 commit into from
Feb 15, 2024
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
33 changes: 33 additions & 0 deletions .github/workflows/linter_check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Code Style Check
# If your code has failed this workflow, you need to install the pre-commit hooks and run `pixi run pre-commit run --all-files`, adding and committing those changes.
# Please see docs/setup.md for more information on installing and what the committing process looks like.

on:
push:
branches:
- main
pull_request:
types:
- opened
- synchronize

env:
PYTHON_VERSION: "3.10"

jobs:
Check-linter-status:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3

- name: Install Python
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}

- name: Install pre-commit
run: pip install pre-commit

- name: Run pre-commit hooks
run: pre-commit run --all-files --show-diff-on-failure
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ repos:
# supported by your project here, or alternatively use
# pre-commit's default_language_version, see
# https://pre-commit.com/#top_level-default_language_version
language_version: python3.11
language_version: python3.10
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
Expand Down
Loading