-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GH workflow to run lint checks daily as well as for every commit …
…and PR. (#14)
- Loading branch information
1 parent
1d19bf0
commit 475dd1f
Showing
1 changed file
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: "lint" | ||
|
||
on: | ||
pull_request: | ||
types: ["opened", "reopened", "synchronize"] | ||
push: | ||
schedule: | ||
# Run daily at 00:15 UTC (the 15 is to avoid periods of high load) | ||
- cron: "15 0 * * *" | ||
workflow_dispatch: | ||
|
||
permissions: | ||
# So the workflow can cancel in-progress jobs | ||
contents: "write" | ||
|
||
concurrency: | ||
group: "${{github.workflow}}-${{github.ref}}" | ||
# Cancel in-progress jobs for efficiency | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
lint: | ||
strategy: | ||
matrix: | ||
os: ["macos-latest", "ubuntu-latest"] | ||
runs-on: "${{matrix.os}}" | ||
steps: | ||
- uses: "actions/checkout@v4" | ||
with: | ||
submodules: "recursive" | ||
|
||
- uses: "actions/setup-python@v5" | ||
with: | ||
python-version: "3.8" | ||
|
||
- name: "Install task" | ||
run: "npm install -g @go-task/cli" | ||
|
||
- if: "matrix.os == 'macos-latest'" | ||
name: "Install coreutils (for md5sum)" | ||
run: "brew install coreutils" | ||
|
||
- name: "Log tool versions" | ||
run: |- | ||
md5sum --version | ||
python --version | ||
tar --version | ||
task --version | ||
- name: "Run lint task" | ||
run: "task lint:check" |