chore: bump go version to 1.22 #30
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: CI Pipeline | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
setup: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
build: | |
runs-on: ubuntu-latest | |
needs: setup | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Mage | |
run: go install github.com/magefile/mage@latest | |
- name: Build | |
run: | | |
mage -v build | |
lint: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Mage | |
run: go install github.com/magefile/mage@latest | |
- name: Setup CI Linter | |
run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.61.0 | |
- name: Lint | |
run: | | |
mage -v lint | |
test: | |
runs-on: ubuntu-latest | |
needs: lint | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
sudo apt update | |
sudo apt install -y gcc | |
- name: Setup Mage | |
run: go install github.com/magefile/mage@latest | |
- name: Test | |
run: | | |
CGO_ENABLED=1 mage -v testRace |