Skip to content

Commit eea0c13

Browse files
Adding CI format check & adding assembler to pre-commit (#83)
* Adding assembler to pre-commit check * Updates pre-commit to avoid deprecation issues * Updates typos version to avoid deprecation issues * Updating pre-commit * Making CI to run on changes only Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent b3eb8ff commit eea0c13

3 files changed

Lines changed: 37 additions & 5 deletions

File tree

.github/workflows/format.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Format
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [main]
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
format:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Set up Python
19+
uses: actions/setup-python@v5
20+
with:
21+
python-version: '3.10'
22+
23+
- name: Install pre-commit
24+
run: pip install pre-commit
25+
26+
- name: Fetch main branch for diff
27+
run: git fetch origin main
28+
29+
- name: Run pre-commit on changed files only
30+
run: pre-commit run --from-ref origin/main --to-ref HEAD

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ tmp/
1919
#========================
2020

2121
*.yml
22+
!.github/workflows/*.yml
2223
*.pyc
2324
*.bak
2425
*.pkl

.pre-commit-config.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ default_language_version:
66
python: python3.10
77
repos:
88
- repo: https://github.com/pre-commit/pre-commit-hooks
9-
rev: v4.5.0 # Updated 2024/04
9+
rev: v5.0.0 # Updated 2025/06
1010
hooks:
1111
- id: trailing-whitespace
1212
- id: end-of-file-fixer
@@ -16,11 +16,11 @@ repos:
1616
args:
1717
- --allow-multiple-documents
1818
- repo: https://github.com/crate-ci/typos
19-
rev: v1.20.9 # Updated 2024/04
19+
rev: v1.33.1 # Updated 2025/06
2020
hooks:
2121
- id: typos
2222
- repo: https://github.com/Lucas-C/pre-commit-hooks
23-
rev: v1.5.1 # Updated 2023/07
23+
rev: v1.5.5 # Updated 2025/06
2424
hooks:
2525
- id: insert-license
2626
name: insert-license-shell
@@ -43,12 +43,12 @@ repos:
4343
files: \.(py)$
4444
args: [--whitespaces-count, '4']
4545
- repo: https://github.com/psf/black-pre-commit-mirror
46-
rev: 24.4.0 # Updated 2024/04
46+
rev: 25.1.0 # Updated 2025/06
4747
hooks:
4848
- id: black
4949
language_version: python3.10
5050
- repo: https://github.com/pre-commit/mirrors-mypy
51-
rev: v1.9.0 # Last checked 2024/04
51+
rev: v1.16.0 # Last checked 2025/06
5252
hooks:
5353
- id: mypy
5454
- repo: local
@@ -62,6 +62,7 @@ repos:
6262
- -rn # Only display messages
6363
- -sn # Don't display the score
6464
- --source-roots=p-isa_tools/kerngen # Working directory
65+
- --source-roots=assembler_tools/hec-assembler-tools # Added directory
6566
- id: clang-format-14
6667
name: clang-format-14
6768
entry: clang-format-14

0 commit comments

Comments
 (0)