-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (40 loc) · 1.33 KB
/
check.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
on:
pull_request:
push:
branches:
- master
name: Check PR
jobs:
conform:
name: Conformance
runs-on: ubuntu-latest
container:
image: golang:1
options: --user 1001 # https://github.com/actions/runner/issues/2033#issuecomment-1598547465
steps:
- name: Check out sources
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: Fetch master branch for reference
# The main branch detection of siderolabs/conform relies on the branch tracking the "origin" remote, see
# https://github.com/siderolabs/conform/blob/2feadaa74eef93dd35f303582f2e82afa62a119d/cmd/conform/enforce.go#L74
run: git checkout master && git checkout -
if: github.ref_name != 'master'
- name: Install siderolabs/conform
run: go install github.com/siderolabs/conform/cmd/conform@latest
- name: Run siderolabs/conform
run: conform enforce
rustfmt:
name: rustfmt
runs-on: ubuntu-latest
steps:
- name: Check out sources
uses: actions/checkout@v4
- name: Install Rust toolchain for formatting
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: rustfmt
- name: rustfmt check
uses: actions-rust-lang/rustfmt@v1