Repository navigation
53 lines (52 loc) 路 1.68 KB
/
Copy pathlint.yml
File metadata and controls
53 lines (52 loc) 路 1.68 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
name: Lint
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test:
runs-on: 'ubuntu-22.04'
steps:
- uses: actions/checkout@v4
# Keep in sync with ci.yml
- name: Manually evict cache entry if applicable
run: ACCESS_TOKEN='${{ secrets.GITHUB_TOKEN }}' python3 .github/workflows/evict.py
- name: "馃殌 Mount Bazel build cache"
uses: actions/cache@v4
with:
path: ~/bazelcache/build
key: lint-bazel-build-${{ runner.os }}-${{ github.sha }}
restore-keys: |
lint-bazel-build-${{ runner.os }}-
lint-bazel-build-
- name: "馃殌 Mount Bazel repo cache"
uses: actions/cache@v4
with:
path: ~/bazelcache/repos
key: lint-bazel-repos-${{ runner.os }}-${{ hashFiles('WORKSPACE') }}
restore-keys: |
lint-bazel-repos-${{ runner.os }}-
lint-bazel-repos-
- name: "鈿欙笍 Setup Bazel"
run: .github/workflows/setup-bazel.sh
- name: Format Bazel files
run: |
./tools/scripts/format_build_files.sh
if ! git diff --quiet; then
git diff
echo ""
echo "-----------------------------------------------------"
echo "Re-run ./tools/scripts/format_build_files.sh and push"
echo "-----------------------------------------------------"
exit 1
fi
- uses: actions/setup-go@v5
with:
go-version: '>=1.19'
- name: Lint workflow files
run: |
go install github.com/rhysd/actionlint/cmd/actionlint@latest
actionlint .github/workflows/*.yml