initialize empty group slices #410
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: CI Build + Unit Test | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.21 | |
- name: Build | |
run: go build -v ./... | |
- name: Test | |
# -count=2 ensures that test fixtures cleanup after themselves | |
# because any leftover state will generally cause the second run to fail. | |
run: go test -shuffle=on -count=2 -race -cover -v ./... | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.21 | |
- name: Run go vet | |
run: go vet ./... | |
- name: Check gofmt passes | |
run: | | |
if [ -n "$(gofmt -l .)" ]; then | |
echo "gofmt failed, please run gofmt -w ." | |
exit 1 | |
fi | |
integration: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.21 | |
- name: Run integration tests | |
run: tests/local |