-
Notifications
You must be signed in to change notification settings - Fork 6
41 lines (38 loc) · 1.13 KB
/
prcheck.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
38
39
40
41
name: PR Check
on:
pull_request:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.82.0
profile: minimal
override: true
- name: Install protoc
run: |
PB_REL="https://github.com/protocolbuffers/protobuf/releases"
curl -LO $PB_REL/download/v25.1/protoc-25.1-linux-x86_64.zip
unzip protoc-25.1-linux-x86_64.zip -d foo
sudo mv foo/bin/protoc /usr/local/bin/protoc
- name: rust cache
uses: Swatinem/rust-cache@v2
- name: Install binstall
run: curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
- name: Install checkers
run: cargo binstall -y cargo-sort
- name: run checkers
run: |
cargo sort -c -w
cargo fmt -- --check
cargo clippy -- -D warnings
cargo test