-
Notifications
You must be signed in to change notification settings - Fork 20
37 lines (37 loc) · 1.06 KB
/
pr-code-lint.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Code Linter
on:
merge_group:
pull_request:
types: ['opened', 'edited', 'reopened', 'synchronize']
push:
branches:
- gha
jobs:
rust-lint:
runs-on: github-arm64-2c-8gb
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- uses: cachix/install-nix-action@v26
- name: nix-shell
run: nix-shell --pure --run exit
- name: cargo-clippy
run: nix-shell --pure --run ./scripts/rust-linter.sh
- name: cargo-fmt
run: nix-shell --pure --run "FMT_OPTS=--check ./scripts/rust-style.sh"
- name: Setup tmate session
if: ${{ failure() }}
timeout-minutes: 240
uses: mxschmitt/action-tmate@v3
# nix-lint:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# with:
# submodules: 'recursive'
# - uses: cachix/install-nix-action@v26
# with:
# nix_path: nixpkgs=channel:nixos-22.11
# - name: nix-shell
# run: nix-shell --pure -p nixpkgs-fmt --run "nixpkgs-fmt --check ."