fix: only update Casks on macOS #72
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: build | |
on: [push, pull_request] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
- name: Run Golangci Linter | |
uses: golangci/golangci-lint-action@v6 | |
with: | |
version: v1.60.1 | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-latest, ubuntu-latest, windows-latest] | |
go: ['1.16', '1.17', '1.18', '1.19', '1.20', '1.21', '1.22', '1.23'] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: extractions/setup-just@v2 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go }} | |
- name: Build and test | |
run: just build test | |
coverage: | |
if: github.ref == 'refs/heads/main' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: extractions/setup-just@v2 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: '1.21' # Fails on newer go versions | |
- name: Generate coverage report | |
run: just coverage | |
- name: Install goveralls | |
run: go get github.com/mattn/goveralls | |
env: | |
GO111MODULE: off | |
- name: Send coverage | |
env: | |
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: goveralls -coverprofile=covprofile -service=github |