-
Notifications
You must be signed in to change notification settings - Fork 0
115 lines (110 loc) · 3.46 KB
/
lint.yml
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
on:
- push
jobs:
api:
name: Lint API
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version-file: api/go.mod
check-latest: true
cache: true
cache-dependency-path: api/go.sum
- uses: golangci/golangci-lint-action@v3
with:
version: v1.50.0
working-directory: api
controller:
name: Lint Controller
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: rustfmt, clippy
- uses: actions/cache@v3
id: cache-llvm
with:
path: ./llvm
key: llvm-12
- uses: KyleMayes/install-llvm-action@v1
with:
version: 12.0
cached: ${{ steps.cache-llvm.outputs.cache-hit }}
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
controller/target/
key: ${{ runner.os }}-cargo-${{ hashFiles('controller/Cargo.lock') }}-${{ github.run_id }}
restore-keys: |
${{ runner.os }}-cargo-${{ hashFiles('controller/Cargo.lock') }}-
- uses: arduino/setup-protoc@v1
with:
version: '3.x'
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --check --manifest-path controller/Cargo.toml
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: clippy - controller
args: --manifest-path controller/Cargo.toml
frontend:
name: Lint Frontend
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: frontend/.nvmrc
cache: yarn
cache-dependency-path: frontend/yarn.lock
- run: yarn install --frozen-lockfile
working-directory: frontend
- run: yarn lint
working-directory: frontend
animations:
name: Lint Animation
runs-on: ubuntu-latest
strategy:
matrix:
animation:
- rainbow
- simple
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: rustfmt, clippy
target: wasm32-unknown-unknown
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
sample-animations/${{ matrix.animation }}/target/
key: ${{ runner.os }}-cargo-${{ matrix.animation }}-${{ hashFiles('sample-animations/${{ matrix.animation }}/Cargo.lock') }}-${{ github.run_id }}
restore-keys: |
${{ runner.os }}-cargo-${{ matrix.animation }}-${{ hashFiles('sample-animations/${{ matrix.animation }}/Cargo.lock') }}-
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --check --manifest-path sample-animations/${{ matrix.animation }}/Cargo.toml
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: clippy - animations - ${{ matrix.animation }}
args: --manifest-path sample-animations/${{ matrix.animation }}/Cargo.toml