Bump support for Go 1.21 #617
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Checks | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
workflow_dispatch: | |
env: | |
GO_VERSION: "1.21" | |
jobs: | |
check-links: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/[email protected] | |
with: | |
fetch-depth: 0 | |
- uses: lycheeverse/[email protected] | |
with: | |
args: >- | |
-v -n "*.md" "**/*.md" | |
--exclude "http://localhost*" | |
fail: true | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Go | |
uses: actions/[email protected] | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- name: Checkout Repo | |
uses: actions/[email protected] | |
- name: Module cache | |
uses: actions/[email protected] | |
env: | |
cache-name: go-mod-cache | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/go.sum') }} | |
- name: Tools cache | |
uses: actions/[email protected] | |
env: | |
cache-name: go-tools-cache | |
with: | |
path: ~/.tools | |
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('./internal/tools/**') }} | |
- name: Install build dependencies | |
run: | | |
sudo apt-get update && sudo apt-get install -y clang llvm libbpf-dev | |
- name: Run linters | |
run: make license-header-check go-mod-tidy golangci-lint | |
- name: Check clean repository | |
run: make check-clean-work-tree | |
compatibility-test: | |
strategy: | |
matrix: | |
go-version: ["1.21", "1.20"] | |
os: [ubuntu-latest] | |
# GitHub Actions does not support arm* architectures on default | |
# runners. It is possible to accomplish this with a self-hosted runner | |
# if we want to add this in the future: | |
# https://docs.github.com/en/actions/hosting-your-own-runners/using-self-hosted-runners-in-a-workflow | |
arch: [amd64] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v3 | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ matrix.go-version }} | |
cache-dependency-path: "**/go.sum" | |
- name: Run tests | |
env: | |
GOARCH: ${{ matrix.arch }} | |
run: make test | |
verify-licenses: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout Repo | |
uses: actions/[email protected] | |
- name: Setup Go | |
uses: actions/[email protected] | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- name: Install build dependencies | |
run: sudo apt-get update && sudo apt-get install -y clang llvm libbpf-dev | |
- run: make verify-licenses |