Skip to content

Commit

Permalink
Preliminary test with pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
confunguido committed Jul 23, 2024
1 parent e8ed4ff commit 8c82e8d
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 1 deletion.
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@
*.json text eol=lf
*.yml text eol=lf
*.csv text eol=lf

20 changes: 20 additions & 0 deletions .github/build-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Cargo Build & Test

on:
push:
pull_request:

env:
CARGO_TERM_COLOR: always

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
13 changes: 13 additions & 0 deletions .github/pre-commit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: pre-commit

on:
pull_request:
push:

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: pre-commit/[email protected]
14 changes: 14 additions & 0 deletions .github/pre-commit.yaml~
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: pre-commit

on:
pull_request:
push:
branches: [main]

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: pre-commit/[email protected]
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,7 @@ Cargo.lock

# Mac development
.DS_Store

# Emacs
*~
\#*
15 changes: 15 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-added-large-files
- id: check-yaml
- id: check-toml
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace
- repo: https://github.com/doublify/pre-commit-rust
rev: v1.0
hooks:
- id: fmt
- id: clippy

0 comments on commit 8c82e8d

Please sign in to comment.