Skip to content
Open
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
2 changes: 2 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ updates:
directory: "/"
schedule:
interval: "daily"
cooldown:
default-days: 7
18 changes: 13 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ on:
permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true

jobs:
cgroup-v2:
name: "cgroup v2 (Ubuntu 26.04)"
Expand All @@ -28,8 +32,10 @@ jobs:
runs-on: ubuntu-26.04

steps:
- uses: actions/checkout@v7
- uses: actions/setup-go@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version: ${{ matrix.go-version }}
go-version-file: go.mod # Take version from go.mod when go-version is empty.
Expand All @@ -40,12 +46,14 @@ jobs:
timeout-minutes: 20
runs-on: ubuntu-26.04
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- uses: lima-vm/lima-actions/setup@v1
- uses: lima-vm/lima-actions/setup@55627e31b78637bf254a8b2a14da8ea7d12564e5 # v1.1.0
id: lima-actions-setup

- uses: actions/cache@v6
- uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ~/.cache/lima
key: lima-${{ steps.lima-actions-setup.outputs.version }}
Expand Down
41 changes: 32 additions & 9 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,26 @@ on:
permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true

jobs:
lint:
timeout-minutes: 30
permissions:
contents: read
pull-requests: read
checks: write # to allow the action to annotate code in the PR.
runs-on: ubuntu-26.04
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
fetch-depth: 2
- uses: actions/setup-go@v7
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version: stable
- uses: golangci/golangci-lint-action@v9
- uses: golangci/golangci-lint-action@ba0d7d2ec06a0ea1cb5fa41b2e4a3ab91d21278a # v9.3.0
# Extra linters, only checking new code from a pull request.
- name: lint-extra
if: github.event_name == 'pull_request'
Expand All @@ -38,7 +42,9 @@ jobs:
codespell:
runs-on: ubuntu-26.04
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: install deps
# Use a known version of codespell.
run: pip install --break-system-packages codespell==v2.4.3
Expand All @@ -48,22 +54,38 @@ jobs:
space-at-eol:
runs-on: ubuntu-26.04
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- run: if git -P grep -I -n '\s$'; then echo "^^^ extra whitespace at EOL, please fix"; exit 1; fi

deps:
runs-on: ubuntu-26.04
steps:
- uses: actions/checkout@v7
- uses: actions/setup-go@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version: stable
- run: go mod tidy --diff

govulncheck:
runs-on: ubuntu-26.04
steps:
- uses: golang/govulncheck-action@v1
- uses: golang/govulncheck-action@032d45514ae346b1db93c04b0c90b841c370344f # v1.1.0

zizmor:
runs-on: ubuntu-26.04
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: zizmorcore/zizmor-action@cc914d7f3750a2d13d75c7f184a1060aa0e9d482 # v0.6.4
with:
version: 1.30.0
advanced-security: false
annotations: true

all-done:
needs:
Expand All @@ -72,6 +94,7 @@ jobs:
- govulncheck
- lint
- space-at-eol
- zizmor
runs-on: ubuntu-26.04
steps:
- run: echo "All jobs completed"
24 changes: 24 additions & 0 deletions .github/zizmor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Configuration for zizmor (https://docs.zizmor.sh/), run by the zizmor job
# in .github/workflows/validate.yml.

rules:
cache-poisoning:
# The audit fires because both workflows are also triggered by pushing a
# v* tag, so anything they cache is, in zizmor's view, a possible input to
# a release build. That does not hold here:
#
# - This is a library: no job produces any release artifacts, and the
# workflows only run tests and linters.
#
# - GitHub scopes caches per branch: a pull request can read the default
# branch's cache, but cannot write to it. So a pull request cannot plant
# an entry that a later push or tag build would restore.
#
# The alternative (cache: false everywhere) makes every Go job re-download
# modules and start from a cold build cache, which is a real slowdown for
# no gain.
#
# Revisit this if a job ever starts publishing artifacts.
ignore:
- test.yml
- validate.yml
Loading