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

Update Github CI and Pre-Commit hooks #231

Merged
merged 1 commit into from
Oct 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
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]
Loading