Skip to content

Commit

Permalink
add linter
Browse files Browse the repository at this point in the history
  • Loading branch information
jobez committed Sep 6, 2023
1 parent 94739c2 commit ace45f5
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 2 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: linters

on:
workflow_call:

jobs:
check:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
override: true
- uses: Swatinem/rust-cache@v2
- uses: actions-rs/cargo@v1
with:
command: check

fmt:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
override: true
components: rustfmt
- uses: Swatinem/rust-cache@v2
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check

clippy:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
override: true
components: clippy
- uses: Swatinem/rust-cache@v2
- uses: actions-rs/cargo@v1
with:
command: clippy
args: --workspace --all-features --all-targets -- -D warnings
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: [pull_request]

jobs:
test:
runs-on: ubuntu-latest-16-cores
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
Expand All @@ -17,7 +17,7 @@ jobs:
- name: Retrieve cached dependencies
uses: Swatinem/rust-cache@v2
# fetch dump
- name: Check resources evolution
- name: fetch dump
run: GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} make fetch-dump
# run tests
- name: run tests
Expand Down

0 comments on commit ace45f5

Please sign in to comment.