-
Notifications
You must be signed in to change notification settings - Fork 4
43 lines (38 loc) · 1.06 KB
/
clippy-fmt.yml
File metadata and controls
43 lines (38 loc) · 1.06 KB
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
name: Lint
on:
push:
branches: ["**"]
pull_request:
branches: ["**"]
jobs:
check_folders:
runs-on: ubuntu-latest
name: Check folders
outputs:
run_job: ${{ steps.list_folders.outputs.run_job }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: List folders
id: list_folders
run: |
JOBS=$(for file in $(ls -d */); do
jq -n --arg job "$file" '{job: $job}'
done | \
jq -cMn '.include |= [inputs]')
echo "::set-output name=run_job::$JOBS"
job_runner:
runs-on: ubuntu-latest
name: Lint folder (${{ matrix.job }})
needs: check_folders
strategy:
max-parallel: 3
matrix: ${{ fromJson(needs.check_folders.outputs.run_job) }}
steps:
- uses: actions/checkout@v2
- name: Check with rustfmt
run: cargo fmt --all -- --check
working-directory: ${{ matrix.job }}
- name: Check with Clippy
run: cargo clippy --workspace --tests --all-features
working-directory: ${{ matrix.job }}