fix version.sh check tag logic #305
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
on: | |
pull_request: | |
branches: | |
- main | |
name: Build Test | |
jobs: | |
build: | |
name: Build & Test | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
include: | |
- goarch: amd64 | |
goos: linux | |
env: | |
GOOS: ${{ matrix.goos }} | |
GOARCH: ${{ matrix.goarch }} | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
ref: 'dev' | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: '1.22.5' | |
cache-dependency-path: subdir/go.sum | |
- name: generate resources | |
run: | | |
mkdir -p {build/data,build/static} | |
go generate ./... | |
- name: Test | |
id: gotest | |
run: | | |
export GOPATH="$HOME/go/" | |
export PATH=$PATH:$GOPATH/bin | |
go install github.com/jstemmer/go-junit-report/v2@latest | |
go test -v 2>&1 ./... | go-junit-report -set-exit-code > report.xml | |
- name: Publish Unit Test Results | |
uses: EnricoMi/[email protected] | |
if: always() | |
with: | |
files: "./report.xml" |