Skip to content

Commit 5f4db80

Browse files
authored
ci: use ansys/actions/code-style (#1611)
* ci: use ansys/actions/code-style * ci: update pre-commit hooks
1 parent 3e4d777 commit 5f4db80

File tree

3 files changed

+9
-27
lines changed

3 files changed

+9
-27
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -73,18 +73,9 @@ jobs:
7373
name: "Style Check"
7474
runs-on: ubuntu-latest
7575
steps:
76-
- uses: actions/checkout@v4
77-
78-
- name: "Setup Python"
79-
uses: actions/setup-python@v5
76+
- uses: ansys/actions/code-style@v6
8077
with:
81-
python-version: ${{ env.MAIN_PYTHON_VERSION }}
82-
83-
- name: "Install pre-commit"
84-
run: pip install pre-commit
85-
86-
- name: "Run pre-commit"
87-
run: pre-commit run --all-files --show-diff-on-failure
78+
use-python-cache: false
8879

8980
build_linux1:
9081
name: "Build linux1 wheel"

.github/workflows/ci_release.yml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -44,18 +44,9 @@ jobs:
4444
name: "Style Check"
4545
runs-on: ubuntu-latest
4646
steps:
47-
- uses: actions/checkout@v4
48-
49-
- name: "Setup Python"
50-
uses: actions/setup-python@v5
47+
- uses: ansys/actions/code-style@v6
5148
with:
52-
python-version: ${{ env.MAIN_PYTHON_VERSION }}
53-
54-
- name: "Install pre-commit"
55-
run: pip install pre-commit
56-
57-
- name: "Run pre-commit"
58-
run: pre-commit run --all-files --show-diff-on-failure
49+
use-python-cache: false
5950

6051
build_linux1:
6152
name: "Build linux1 wheel"

.pre-commit-config.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,30 +12,30 @@ exclude: |
1212
repos:
1313

1414
- repo: https://github.com/psf/black
15-
rev: 22.10.0
15+
rev: 24.4.2
1616
hooks:
1717
- id: black
1818

1919
- repo: https://github.com/PyCQA/flake8
20-
rev: 6.0.0
20+
rev: 7.0.0
2121
hooks:
2222
- id: flake8
2323

2424
- repo: https://github.com/codespell-project/codespell
25-
rev: v2.2.2
25+
rev: v2.3.0
2626
hooks:
2727
- id: codespell
2828
args: ["--ignore-words=ignore_words.txt"]
2929

3030
- repo: https://github.com/pre-commit/pre-commit-hooks
31-
rev: v4.4.0
31+
rev: v4.6.0
3232
hooks:
3333
- id: check-merge-conflict
3434
- id: debug-statements
3535
- id: requirements-txt-fixer
3636

3737
# this validates our github workflow files
3838
- repo: https://github.com/python-jsonschema/check-jsonschema
39-
rev: 0.19.2
39+
rev: 0.28.5
4040
hooks:
4141
- id: check-github-workflows

0 commit comments

Comments
 (0)