-
Notifications
You must be signed in to change notification settings - Fork 9
43 lines (43 loc) · 1.61 KB
/
Copy pathlint.yml
File metadata and controls
43 lines (43 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Lint
on:
pull_request:
push:
branches:
- main
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
format:
runs-on:
group: Self Hosted
labels: edera-16
env:
SHFMT_VERSION: "3.12.0"
SHELLCHECK_VERSION: "0.11.0"
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v4
# Pin tool versions to match the local formatter; a version skew would
# reformat differently and flip the gate red on already-formatted code.
- name: Install tools
run: |
mkdir -p "${HOME}/.local/bin"
echo "${HOME}/.local/bin" >> "${GITHUB_PATH}"
curl -sSfL "https://github.com/mvdan/sh/releases/download/v${SHFMT_VERSION}/shfmt_v${SHFMT_VERSION}_linux_amd64" -o "${HOME}/.local/bin/shfmt"
chmod +x "${HOME}/.local/bin/shfmt"
curl -sSfL "https://github.com/koalaman/shellcheck/releases/download/v${SHELLCHECK_VERSION}/shellcheck-v${SHELLCHECK_VERSION}.linux.x86_64.tar.xz" | tar -xJ -C /tmp
install -m755 "/tmp/shellcheck-v${SHELLCHECK_VERSION}/shellcheck" "${HOME}/.local/bin/shellcheck"
- name: Install the latest version of uv
uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
with:
python-version: "3.14"
- name: Show versions
run: |
shfmt --version
uv tool run black --version
shellcheck --version
- name: Check formatting
run: ./hack/code/format.sh --check