Skip to content

Commit 16b2700

Browse files
authored
ci: Add GitHub workflow to run code linting checks daily, on push, and on pull request. (#11)
1 parent b2d9a56 commit 16b2700

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
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+
python-version: "3.11"
33+
34+
- name: "Install task"
35+
shell: "bash"
36+
run: "npm install -g @go-task/cli"
37+
38+
- if: "matrix.os == 'macos-latest'"
39+
name: "Install coreutils (for md5sum)"
40+
run: "brew install coreutils"
41+
42+
- name: "Log tool versions"
43+
run: |-
44+
md5sum --version
45+
python --version
46+
tar --version
47+
task --version
48+
49+
- name: "Run lint task"
50+
shell: "bash"
51+
run: "task lint:check"

0 commit comments

Comments
 (0)