Skip to content

chore: update go version #38

chore: update go version

chore: update go version #38

Workflow file for this run

---
name: Go workflow
on:
push:
branches:
- "*"
- "*/*"
- "**"
- "!main"
permissions:
contents: read
jobs:
lint:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/setup-go@v3
with:
go-version: 1.22
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.46
args: --timeout 5m
test:
name: Test Go ${{ matrix.go }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
go: ["1.22"]
steps:
- name: Go ${{ matrix.go }}
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- name: Checkout source code
uses: actions/checkout@master
- name: Get dependencies
run: go get -t -v
- name: Run test
if: matrix.os == 'windows-latest'
run: go test -v
- name: Run test coverage
if: matrix.os != 'windows-latest'
run: go test -v -coverprofile=coverage.out -covermode=count
- name: Publish coverage
if: matrix.os != 'windows-latest'
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: bash <(curl -s https://codecov.io/bash)