Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: ci

on:
pull_request:
push:
branches: [main]

permissions:
contents: read

jobs:
lint:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: jdx/mise-action@c2a87611a18de5b3828c5652fe268e992400cb5c # v4.3.0
- run: mise x hk -- hk check --all
2 changes: 1 addition & 1 deletion .luarc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"version": "Lua 5.1"
},
"diagnostics": {
"disable": ["duplicate-set-field"]
"disable": ["duplicate-set-field", "undefined-doc-param", "doc-field-no-class"]
},
"workspace": {
"checkThirdParty": false,
Expand Down
8 changes: 5 additions & 3 deletions hk.pkl
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ local linters = new Mapping<String, Step> {
check = "stylua --check {{files}}"
fix = "stylua {{files}}"
}
["actionlint"] {
glob = ".github/workflows/*.{yml,yaml}"
check = "actionlint {{files}}"
// lints GitHub Actions workflows (jdx/jactionlint, a maintained actionlint fork)
["jactionlint"] {
glob = List(".github/workflows/*.yml", ".github/workflows/*.yaml")
batch = true
check = "jactionlint {{files}}"
}
}

Expand Down
2 changes: 1 addition & 1 deletion hooks/available.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ local function fetch_versions()
})

if err ~= nil or resp.status_code ~= 200 then
error("Failed to fetch versions from GCS: " .. (err or "status " .. resp.status_code))
error("Failed to fetch versions from GCS: " .. (err or ("status " .. resp.status_code)))
end

local data = json.decode(resp.body)
Expand Down
237 changes: 237 additions & 0 deletions mise.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion mise.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
MISE_USE_VERSIONS_HOST = "0"

[tools]
actionlint = "latest"
hk = "latest"
jactionlint = "latest"
lua = "5.4"
lua-language-server = "latest"
pkl = "latest"
Expand Down
Loading