-
Notifications
You must be signed in to change notification settings - Fork 20
40 lines (37 loc) · 1.12 KB
/
codeformat.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
name: pull_request
on: pull_request
jobs:
codegen:
name: Code format check
runs-on: ubuntu-22.04
steps:
- name: Cancel Previous Actions
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Free disk space
run: |
echo "Before clearing disk space:"
df -h
# https://github.com/actions/virtual-environments/issues/709
sudo apt-get clean
# Clean up pre-installed tools
# https://github.com/actions/virtual-environments/issues/1918
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf /usr/local/share/boost
sudo rm -rf $AGENT_TOOLSDIRECTORY
echo "After clearing disk space:"
df -h
- name: Check out code into the Go module directory
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: "go.mod"
id: go
- name: Check code format
run: |
./ci/check-code-format.sh