Skip to content

Commit fc80cb6

Browse files
committed
fix(ci): run linters through mise
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
1 parent da28026 commit fc80cb6

3 files changed

Lines changed: 24 additions & 24 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 9 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -12,33 +12,19 @@ concurrency:
1212
cancel-in-progress: true
1313

1414
jobs:
15-
shell:
16-
name: Shell
15+
check:
16+
name: Lint and test
1717
runs-on: ubuntu-latest
1818
permissions:
1919
contents: read
2020
steps:
21-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
21+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
2222
with:
2323
persist-credentials: false
24-
- name: shellcheck
25-
run: git ls-files -z '*.sh' | xargs -0 shellcheck -x
26-
- name: Run tests
27-
run: |
28-
while IFS= read -r suite; do
29-
echo "==> $suite"
30-
bash "$suite"
31-
done < <(git ls-files 'tests/**/*_test.sh')
3224

33-
actionlint:
34-
name: Actionlint
35-
runs-on: ubuntu-latest
36-
permissions:
37-
contents: read
38-
steps:
39-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
40-
with:
41-
persist-credentials: false
42-
- uses: docker://rhysd/actionlint@sha256:887a259a5a534f3c4f36cb02dca341673c6089431057242cdc931e9f133147e9 # v1.7.7
43-
with:
44-
args: -color
25+
# Tool versions live in mise.toml so a contributor running `mise run lint`
26+
# locally gets exactly what CI runs.
27+
- uses: jdx/mise-action@c2a87611a18de5b3828c5652fe268e992400cb5c # v4.3.0
28+
29+
- run: mise run lint
30+
- run: mise run test

‎.github/workflows/semconv.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
# Under pull_request_target this checks out the base ref, which is what
1818
# the local action reference below needs. Never point it at the pull
1919
# request head, and never add an install or build step to this job.
20-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
20+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
2121
with:
2222
persist-credentials: false
2323
- uses: ./actions/semconv/pull-request

‎mise.toml‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[tools]
2+
actionlint = "1.7.12"
3+
shellcheck = "0.11.0"
4+
5+
[tasks.lint]
6+
description = "Lint every shell script and workflow"
7+
run = [
8+
"git ls-files -z '*.sh' | xargs -0 shellcheck -x",
9+
"actionlint",
10+
]
11+
12+
[tasks.test]
13+
description = "Run every test suite"
14+
run = "git ls-files 'tests/**/*_test.sh' | while IFS= read -r suite; do echo \"==> $suite\"; bash \"$suite\" || exit 1; done"

0 commit comments

Comments
 (0)