chore(deps): update dependency goreleaser/goreleaser to v2 #309
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: Tests | |
on: | |
push: | |
branches: | |
- main | |
- renovate/** | |
tags: | |
- 'v*' | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
- reopened | |
jobs: | |
lint: | |
runs-on: 'ubuntu-latest' | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- uses: jdx/mise-action@a4cfebde9ceb9b49b54db1d148fa86a52e1b7fab # v2 | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6 | |
with: | |
version: latest | |
test: | |
runs-on: 'ubuntu-latest' | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- uses: jdx/mise-action@a4cfebde9ceb9b49b54db1d148fa86a52e1b7fab # v2 | |
- name: Unit Tests | |
run: go test -cover ./... | |
acceptance-test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: | |
- 'ubuntu-latest' | |
- 'macos-latest' | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- uses: jdx/mise-action@a4cfebde9ceb9b49b54db1d148fa86a52e1b7fab # v2 | |
- name: Prepare runnable binary | |
run: | | |
mkdir bin | |
echo "${GITHUB_WORKSPACE}/bin" >> "${GITHUB_PATH}" | |
#- name: Build binary | |
# uses: goreleaser/goreleaser-action@v5.0.0 | |
# with: | |
# args: build --clean --snapshot --single-target --output bin/template-goapp | |
# # TODO: enable coverage | |
# env: | |
# # Fix version to match the one expected in tests: | |
# GORELEASER_CURRENT_TAG: v1.2.3 | |
- name: Build binary | |
run: | | |
go build \ | |
-cover \ | |
-ldflags "-s -w -X main.version=1.2.3" \ | |
-o bin/template-goapp | |
env: | |
CGO_ENABLED: 0 | |
- name: Install Test Dependencies | |
working-directory: test | |
run: | | |
gem install bundler | |
bundle install | |
- name: Run tests | |
working-directory: test | |
run: | | |
mkdir "${GOCOVERDIR}" | |
bundle exec cucumber --publish-quiet --tags 'not @pending' | |
go tool covdata percent -i="${GOCOVERDIR}" | |
env: | |
GOCOVERDIR: /tmp/coverage | |
# TODO: Report coverage so that it's visible on PRs |