mirror of
https://github.com/opencontainers/runtime-spec.git
synced 2026-02-05 09:45:57 +01:00
* Add minimum supported Go version to CI On top of automatically testing against the two most recent releases (what Go upstream supports), also test explicitly against our lower bound. As noted in the previous change, don't have a `go.mod` to source this information from, so it's simply hard-coded in this file instead. (I chose 1.21 as that was the lowest version we were testing against previously, but it's possible that could go lower or actually reasonably needs to go higher.) Signed-off-by: Tianon Gravi <admwiggin@gmail.com> * Add explicit `GOTOOLCHAIN=local` in CI Signed-off-by: Tianon Gravi <admwiggin@gmail.com> --------- Signed-off-by: Tianon Gravi <admwiggin@gmail.com>
55 lines
1.1 KiB
YAML
55 lines
1.1 KiB
YAML
name: build
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
run:
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
matrix:
|
|
# our oldest (officially) supported version and the two upstream-supported versions
|
|
go: [1.21.x, oldstable, stable]
|
|
|
|
env:
|
|
# avoid downloading any alternate toolchains (https://go.dev/doc/toolchain)
|
|
GOTOOLCHAIN: local
|
|
|
|
steps:
|
|
- name: checkout source code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: setup go environment
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: ${{ matrix.go }}
|
|
|
|
- name: create go.mod
|
|
run: |
|
|
# Fix for "cannot find main module" issue
|
|
go mod init github.com/opencontainers/runtime-spec
|
|
|
|
go get -d ./schema/...
|
|
|
|
- name: run golangci-lint
|
|
uses: golangci/golangci-lint-action@v8
|
|
with:
|
|
version: v2.5
|
|
|
|
- name: run tests
|
|
run: |
|
|
set -x
|
|
make install.tools
|
|
|
|
make .govet
|
|
|
|
make .gitvalidation
|
|
make docs
|
|
make -C schema test
|