nurse/.forgejo/workflows/go.yaml

39 lines
1,009 B
YAML
Raw Normal View History

2023-11-29 21:01:37 +00:00
name: Go build
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
2023-11-29 21:01:37 +00:00
with:
fetch-depth: '0'
lfs: 'true'
fetch-tags: 'true'
- name: Setup Go 1.21.x
uses: actions/setup-go@v4
with:
# Semantic version range syntax or exact version of Go
go-version: '1.21.x'
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
- name: Install Task
uses: arduino/setup-task@v1
- name: Run tests
run: |
go install gotest.tools/gotestsum@latest
gotestsum --junitfile out/results.xml --format pkgname-and-test-fails -- -race -shuffle=on ./...
- uses: goreleaser/goreleaser-action@v4
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
with:
distribution: goreleaser
version: latest
args: release --clean --snapshot