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
36 changes: 36 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: test
on:
push:
tags:
- v*
branches:
- main
- release-*
pull_request:
permissions:
contents: read

jobs:
unit:
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04]
go-version: [1.23.x, 1.24.x]
race: ["-race", ""]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- run: go test -timeout 3m ${{ matrix.race }} -v ./...

all-done:
needs:
- unit
runs-on: ubuntu-24.04
steps:
- run: echo "All jobs completed"
87 changes: 87 additions & 0 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: validate
on:
push:
tags:
- v*
branches:
- main
- release-*
pull_request:
env:
GO_VERSION: 1.24
permissions:
contents: read

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-24.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- uses: actions/setup-go@v5
with:
go-version: "${{ env.GO_VERSION }}"
- uses: golangci/golangci-lint-action@v6
with:
version: v1.64
# Extra linters, only checking new code from a pull request.
- name: lint-extra
if: github.event_name == 'pull_request'
run: |
golangci-lint run --config .golangci-extra.yml --new-from-rev=HEAD~1

go-fix:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- uses: actions/setup-go@v5
with:
go-version: "${{ env.GO_VERSION }}"
- name: run go fix
run: |
go fix ./...
git diff --exit-code

codespell:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: install deps
# Use a known version of codespell.
run: pip install --break-system-packages codespell==v2.4.1
- name: run codespell
run: codespell

space-at-eol:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- run: if git -P grep -I -n '\s$'; then echo "^^^ extra whitespace at EOL, please fix"; exit 1; fi

deps:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "${{ env.GO_VERSION }}"
- run: go mod tidy --diff

all-done:
needs:
- codespell
- deps
- go-fix
- lint
- space-at-eol
runs-on: ubuntu-24.04
steps:
- run: echo "All jobs completed"
12 changes: 12 additions & 0 deletions .golangci-extra.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# This is golangci-lint config file which is used to check NEW code in
# github PRs only (see lint-extra in .github/workflows/validate.yml).
#
# For the default linter config, see .golangci.yml. This config should
# only enable additional linters not enabled in the default config.

linters:
disable-all: true
enable:
- godot
- revive

13 changes: 13 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# For documentation, see https://golangci-lint.run/usage/configuration/

linters:
enable:
- gofumpt
- errorlint
- unconvert
- unparam

linters-settings:
govet:
enable:
- nilness
2 changes: 1 addition & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ However, specification releases have special restrictions in the [OCI charter][c
* They are the target of backwards compatibility (§7.g), and
* They are subject to the OFWa patent grant (§8.d and e).

To avoid unfortunate side effects (onerous backwards compatibity requirements or Member resignations), the following additional procedures apply to specification releases:
To avoid unfortunate side effects (onerous backwards compatibility requirements or Member resignations), the following additional procedures apply to specification releases:

### Planning a release

Expand Down