We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5e23df2 commit fc377cdCopy full SHA for fc377cd
.github/workflows/pr-checks.yml
@@ -0,0 +1,27 @@
1
+name: PR checks
2
+
3
+on:
4
+ pull_request:
5
+ branches:
6
+ - main
7
8
+jobs:
9
+ test:
10
+ runs-on: ubuntu-latest
11
+ permissions:
12
+ contents: write
13
+ steps:
14
+ - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
15
+ with:
16
+ ref: ${{ github.head_ref }}
17
+ - name: Install Rust toolchain
18
+ uses: dtolnay/rust-toolchain@stable
19
+ - name: Cargo fmt
20
+ run: |
21
+ cargo fmt
22
+ git config --global user.name 'cargofmt robot'
23
+ git diff --quiet && git diff --staged --quiet || git commit -am "chore: rustfmt"
24
+ git push
25
+ - name: Cargo test
26
27
+ cargo test
0 commit comments