Skip to content

fix(lock): use age <= timeout (not age < timeout) to include the boundary #96

fix(lock): use age <= timeout (not age < timeout) to include the boundary

fix(lock): use age <= timeout (not age < timeout) to include the boundary #96

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
shellcheck:
name: shellcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Install shellcheck
run: |
sudo apt-get update
sudo apt-get install -y shellcheck
shellcheck --version
- name: Run shellcheck
run: |
set -e
# -x: follow `shellcheck source=` directives (entrypoint.sh sources lib.sh).
shellcheck -x entrypoint.sh lib.sh
shellcheck tests/contract.sh
shellcheck tests/smoke.sh
actionlint:
name: actionlint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
# rhysd/actionlint is a Go binary, not a JavaScript action. We install
# it directly from the upstream release instead of using a wrapper
# action, which keeps the dependency footprint small and the version
# pin explicit.
- name: Install actionlint
run: |
set -e
ver=1.7.7
curl -sSL -o /tmp/actionlint.tar.gz \
"https://github.com/rhysd/actionlint/releases/download/v${ver}/actionlint_${ver}_linux_amd64.tar.gz"
tar -xzf /tmp/actionlint.tar.gz -C /tmp actionlint
sudo mv /tmp/actionlint /usr/local/bin/actionlint
actionlint --version
- name: Run actionlint
run: actionlint -color
hadolint:
name: hadolint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
# Pin to a specific tag because the upstream has no floating "v3" ref
# (only v3.0.0, v3.1.0, ...). Using `@v3` makes the resolver fail.
- uses: hadolint/hadolint-action@2332a7b74a6de0dda2e2221d575162eba76ba5e5 # v3.3.0
with:
dockerfile: Dockerfile
# DL3018 (pin apk versions) is a real concern but fixing it is
# out of scope for this PR — it will be addressed alongside
# the image digest pinning work. Treat as info for now.
failure-threshold: error
contract:
name: Contract test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Verify action.yml ↔ entrypoint.sh/lib.sh consistency
run: tests/contract.sh
unit:
name: Unit tests (bats)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Install bats
run: |
sudo apt-get update
sudo apt-get install -y bats
bats --version
- name: Run bats unit tests for lib.sh
run: bats tests/unit
smoke:
name: Smoke tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Run entrypoint.sh smoke tests in alpine
run: tests/smoke.sh