Merge pull request #205 from corywalker/corywalker #40
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
# This workflow will build a golang project | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go | |
name: Go | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
# Only test latest and minimum versions to save test compute. | |
go-version: [ '1.23.x', '1.20.x' ] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
lfs: 'true' | |
- name: Set up Go ${{ matrix.go-version }} | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Run golangci-lint | |
uses: golangci/[email protected] | |
- name: Check that `go generate ./...` has been run. | |
run: go install github.com/go-bindata/go-bindata/... && go generate ./expreduce/builtin.go && git diff --quiet | |
- name: Build | |
run: go build -v ./... | |
- name: Test | |
run: go test -v ./... | |
- name: Test concurrency | |
run: go test -v -race ./... -run Concurrency | |
- name: GoReleaser Action | |
uses: goreleaser/[email protected] | |
# Run only on new tag. | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
version: latest | |
args: release --clean | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |