Merge pull request #25 from josephcopenhaver/develop #214
Workflow file for this run
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: test project | |
on: | |
push: | |
schedule: | |
- cron: "15 12 * * 6" # INIT_CRON_EXPRESSION: echo "$(((RANDOM%60))) $(((RANDOM%24)))"' * * '"$( if [[ $(((RANDOM%2))) -eq 0 ]]; then echo 0; else echo 6; fi )" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
go: ["1.22", "1.23"] | |
name: Go ${{ matrix.go }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: ${{ matrix.go }} | |
- name: verify golang files are consistently formatted and generated | |
run: | | |
[ `git status --porcelain=1 | wc -l` -eq 0 ] || (2>&1 echo "failed to establish that files were unchanged before running go-generate check" ; exit 1) | |
go generate ./... | |
[ `git status --porcelain=1 | wc -l` -eq 0 ] || (2>&1 echo "files changed after running go-generate" ; exit 1) | |
- name: test without race | |
run: go test ./... | |
- name: test with race | |
run: go test -race ./... |