Skip to content

⬆️ Upgrade go version #89

⬆️ Upgrade go version

⬆️ Upgrade go version #89

Workflow file for this run

name: go
# Controls when the workflows will run
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
# The 'test' job runs all the go tests
test:
name: test
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Setup Go environment
uses: actions/setup-go@v3
with:
go-version: 1.20
- name: Test
run: go test -v -count=1 -timeout=10s ./...
# The 'test' job runs all the go tests
test_os:
strategy:
matrix:
os: ['ubuntu-22.04', 'ubuntu-20.04']
go-version: ['1.20', '1.21']
name: test go${{ matrix.go-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Setup Go environment
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: Test
run: go test -v -count=1 -timeout=10s ./...
# The 'examples' package builds all the examples
examples:
name: examples
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Setup Go environment
uses: actions/setup-go@v3
with:
go-version: 1.20
- name: Change to examples module
run: cd ./examples
- name: Build examples
working-directory: ./examples
run: go build -v -o ./outputs/ ./...
# The 'lint' job runs the linter
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Setup Go environment
uses: actions/setup-go@v3
with:
go-version: 1.20
# Equivalent of locally running the command 'golangci-lint run'
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.51.2