-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (56 loc) · 1.91 KB
/
reviewdog.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
name: reviewdog
on: [pull_request]
jobs:
reviewdog:
timeout-minutes: 40
name: reviewdog
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: '1.13.4' # Define the elixir version [required]
otp-version: '25.3' # Define the OTP version [required]
- name: Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
override: true
components: rustfmt, clippy
- name: Restore dependencies cache
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target
deps
_build
key: lint-${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: |
lint-${{ runner.os }}-mix-
- name: Install dependencies
run: mix deps.get
- uses: reviewdog/action-setup@v1
- name: reviewdog(credo)
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
mix credo list --format flycheck | reviewdog -efm="%f:%l:%c: %m" -name="mix credo" -diff="git diff FETCH_HEAD" -reporter=github-pr-review
- name: reviewdog(cargo check)
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cargo check -q --message-format=short 2>&1 | reviewdog -f=cargo-check -name="cargo check" -diff="git diff FETCH_HEAD" -reporter=github-pr-review
- name: reviewdog(clippy)
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cargo clippy -q --message-format=short 2>&1 | reviewdog -f=clippy -name="cargo clippy" -diff="git diff FETCH_HEAD" -reporter=github-pr-review