-
Notifications
You must be signed in to change notification settings - Fork 44
31 lines (28 loc) · 729 Bytes
/
pr.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
name: PullRequest
on:
pull_request:
branches: [ master ]
env:
CARGO_TERM_COLOR: always
jobs:
quickcheck:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.rustversion.outputs.rustversion }}
steps:
- uses: actions/checkout@v2
- run: cargo check
- run: cargo pkgid
- run: 'echo "$(cargo pkgid | cut -d# -f2)"'
- id: rustversion
run: 'echo "::set-output name=rustversion::$(cargo pkgid | cut -d# -f2)"'
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Clippy
run: rustup component add clippy rustfmt
- name: Clippy
run: cargo clippy -- -D warnings
- name: Rustfmt
run: cargo fmt --all -- --check