Skip to content

Commit e6a17e6

Browse files
committed
Add GitHub workflow to run code linting checks daily and on every push or pull request.
1 parent b2d9a56 commit e6a17e6

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: "code-linting-checks"
2+
3+
on:
4+
pull_request:
5+
push:
6+
schedule:
7+
# Run daily at 00:15 UTC (the 15 is to avoid periods of high load)
8+
- cron: "15 0 * * *"
9+
workflow_dispatch:
10+
11+
permissions: {}
12+
13+
concurrency:
14+
group: "${{github.workflow}}-${{github.ref}}"
15+
16+
# Cancel in-progress jobs for efficiency
17+
cancel-in-progress: true
18+
19+
jobs:
20+
lint-check:
21+
strategy:
22+
matrix:
23+
os: ["macos-latest", "ubuntu-latest"]
24+
runs-on: "${{matrix.os}}"
25+
steps:
26+
- uses: "actions/checkout@v4"
27+
with:
28+
submodules: "recursive"
29+
30+
- uses: "actions/setup-python@v5"
31+
with:
32+
# NOTE: We resolve some of clang-tidy's IWYU violations using CPython 3.10's headers, so
33+
# we need to use the same version of Python when running clang-tidy.
34+
python-version: "3.10"
35+
36+
- name: "Install task"
37+
shell: "bash"
38+
run: "npm install -g @go-task/cli"
39+
40+
- name: "Log tool versions"
41+
run: |-
42+
md5sum --version
43+
python --version
44+
tar --version
45+
task --version
46+
47+
- if: "matrix.os == 'macos-latest'"
48+
name: "Install coreutils (for md5sum)"
49+
run: "brew install coreutils"
50+
51+
- name: "Run lint task"
52+
shell: "bash"
53+
run: "task lint:check"

0 commit comments

Comments
 (0)