Skip to content

Commit

Permalink
Merge pull request #231 from EmperorArthur/ci-fix
Browse files Browse the repository at this point in the history
Update Github CI and Pre-Commit hooks
  • Loading branch information
EmperorArthur authored Oct 15, 2024
2 parents b4ff706 + 728fff1 commit 235da57
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 13 deletions.
15 changes: 3 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: 💾 Check out repository
uses: actions/checkout@v3

- name: 🪝 Cache pre-commit hooks
uses: actions/cache@v3
with:
path: ~/.cache/pre-commit
key: "pre-commit-${{ runner.os }}-${{ hashFiles('.pre-commit-config.yaml')
}}"

uses: actions/checkout@v4
- uses: actions/setup-python@v3 # WARNING: This must be v3
- name: ✨ Install pre-commit
shell: bash
run: python3 -m pip install pre-commit

uses: pre-commit/[email protected]
- name: 🔥 Test
run: pre-commit run --show-diff-on-failure --all-files

Expand Down
19 changes: 18 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,24 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v5.0.0
hooks:
- id: check-merge-conflict
- id: end-of-file-fixer
- id: fix-byte-order-marker
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- id: check-case-conflict
- id: check-illegal-windows-names
- id: check-json
- id: check-yaml
#- id: name-tests-test # Ensure's pytest files end in "_test.py
- id: no-commit-to-branch # Prevent accidental commits to main

- repo: local
hooks:
- id: no-stl
name: Forbid STL files
entry: Do not commit STL files.
language: fail
files: \.stl
types: [binary]

0 comments on commit 235da57

Please sign in to comment.