ci: add linting to CI
This commit is contained in:
parent
6431d97afa
commit
8a669f70d2
2 changed files with 51 additions and 1 deletions
28
.github/workflows/deploy.yml
vendored
28
.github/workflows/deploy.yml
vendored
|
|
@ -8,6 +8,30 @@ concurrency:
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
lint:
|
||||||
|
name: Lint
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Check out code into the Go module directory
|
||||||
|
uses: actions/checkout@v6
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Install nix
|
||||||
|
uses: DeterminateSystems/nix-installer-action@main
|
||||||
|
|
||||||
|
- name: Setup Nix cache
|
||||||
|
uses: nix-community/cache-nix-action@main
|
||||||
|
with:
|
||||||
|
primary-key: nix-${{ runner.os }}-${{ hashFiles('**/*.nix', '**/flake.lock') }}
|
||||||
|
restore-prefixes-first-match: nix-${{ runner.os }}-
|
||||||
|
|
||||||
|
- name: Check formatting
|
||||||
|
run: nix develop -c cargo fmt --check
|
||||||
|
|
||||||
|
- name: Clippy
|
||||||
|
run: nix develop -c cargo clippy
|
||||||
|
|
||||||
test:
|
test:
|
||||||
name: Run Tests
|
name: Run Tests
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
@ -33,7 +57,9 @@ jobs:
|
||||||
deploy:
|
deploy:
|
||||||
name: Deploy to Fly.io
|
name: Deploy to Fly.io
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [test]
|
needs:
|
||||||
|
- lint
|
||||||
|
- test
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
|
|
|
||||||
24
.github/workflows/push.yml
vendored
24
.github/workflows/push.yml
vendored
|
|
@ -8,6 +8,30 @@ concurrency:
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
lint:
|
||||||
|
name: Lint
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Check out code into the Go module directory
|
||||||
|
uses: actions/checkout@v6
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Install nix
|
||||||
|
uses: DeterminateSystems/nix-installer-action@main
|
||||||
|
|
||||||
|
- name: Setup Nix cache
|
||||||
|
uses: nix-community/cache-nix-action@main
|
||||||
|
with:
|
||||||
|
primary-key: nix-${{ runner.os }}-${{ hashFiles('**/*.nix', '**/flake.lock') }}
|
||||||
|
restore-prefixes-first-match: nix-${{ runner.os }}-
|
||||||
|
|
||||||
|
- name: Check formatting
|
||||||
|
run: nix develop -c cargo fmt --check
|
||||||
|
|
||||||
|
- name: Clippy
|
||||||
|
run: nix develop -c cargo clippy
|
||||||
|
|
||||||
test:
|
test:
|
||||||
name: Run Tests
|
name: Run Tests
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue