Skip to content
Closed
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
16 changes: 16 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ env:
RUSTUP_MAX_RETRIES: 10
PACKAGE_NAME: ruff
PYTHON_VERSION: "3.13"
SHELLCHECK_VERSION: "0.10.0"

jobs:
determine_changes:
Expand Down Expand Up @@ -654,6 +655,21 @@ jobs:
with:
path: ~/.cache/pre-commit
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
- name: "Cache shellcheck"
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4
with:
path: /usr/local/bin/shellcheck
key: shellcheck-${{ env.SHELLCHECK_VERSION }}
- name: "Install shellcheck"
run: |
test -f /usr/local/bin/shellcheck && exit 0 # already installed (e.g. from cache)
cd "$(mktemp -d)"
gh release download -R koalaman/shellcheck "v${{ env.SHELLCHECK_VERSION }}" -p '*linux.x86_64*'
tar --strip-components=1 -xJf "shellcheck-v${{ env.SHELLCHECK_VERSION }}.linux.x86_64.tar.xz"
cp shellcheck /usr/local/bin/shellcheck
shellcheck --version
env:
GH_TOKEN: ${{ github.token }} # required to use `gh release download`
- name: "Run pre-commit"
run: |
echo '```console' > "$GITHUB_STEP_SUMMARY"
Expand Down
12 changes: 7 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,13 @@ repos:
args:
- "-ignore=SC2129" # ignorable stylistic lint from shellcheck
- "-ignore=SC2016" # another shellcheck lint: seems to have false positives?
additional_dependencies:
# actionlint has a shellcheck integration which extracts shell scripts in `run:` steps from GitHub Actions
# and checks these with shellcheck. This is arguably its most useful feature,
# but the integration only works if shellcheck is installed
- "github.com/wasilibs/go-shellcheck/cmd/shellcheck@v0.10.0"
# actionlint has a shellcheck integration which extracts shell scripts in `run:` steps from GitHub Actions
# and checks these with shellcheck. This is arguably its most useful feature,
# but the integration only works if shellcheck is installed.
# The CI pipeline installs the native version of shellcheck; for maximum local coverage, ensure you do too.
# If you can't, you can uncomment the below to install a slow, WASI-based version of shellcheck.
# additional_dependencies:
# - "github.com/wasilibs/go-shellcheck/cmd/shellcheck@v0.10.0"

ci:
skip: [cargo-fmt, dev-generate-all]
Loading