Skip to content

Update build.yml

Update build.yml #53

Workflow file for this run

name: build
on: [push]
jobs:
build:
strategy:
matrix:
go-version: ['1.16', '1.17', '1.18', '1.19', '1.20', '1.21', '1.22']
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v2
- name: Build
run: |
GOOS=freebsd go build
GOOS=openbsd go build
go build -v .
- name: Test
run: |
go vet
go test -v -race -coverprofile=coverage.txt -covermode=atomic
- name: After success
run: |
bash <(curl -s https://codecov.io/bash)