Skip to content

Require Go 1.19+

Require Go 1.19+ #36

Workflow file for this run

name: CI
on:
- push
- pull_request
jobs:
test:
strategy:
matrix:
platform:
- Linux
- macOS
- Windows
go-version:
- '1.19'
- '1.20'
- '1.21'
include:
- platform: Linux
os: ubuntu-latest
- platform: macOS
os: macos-latest
- platform: Windows
os: windows-latest
fail-fast: false
name: Go ${{ matrix.go-version }} on ${{ matrix.platform }}
runs-on: ${{ matrix.os }}
env:
HOMEBREW_NO_ANALYTICS: 1
HOMEBREW_NO_AUTO_UPDATE: 1
timeout-minutes: 10
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Download modules
run: go mod download
- name: Install Mercurial on macOS
if: matrix.platform == 'macOS'
run: brew install mercurial
- name: Test
run: go test -v -race -coverprofile coverage.txt ./...
- name: Vet
run: go vet ./...
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
flags: ${{ matrix.platform }}
env_vars: GO
env:
GO: ${{ matrix.go-version }}