Automatically create PRs for commits on staging branches #341
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 | |
on: [pull_request] | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.22' | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v4 | |
- name: go fmt | |
run: test -z $(gofmt -l .) | |
- name: go vet | |
run: go vet ./... | |
- name: golint | |
run: go install golang.org/x/lint/golint@latest && golint ./... | |
- name: test | |
run: go test -timeout 60s -race ./... | |
system-test: | |
name: System Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v4 | |
- name: Start environment | |
run: docker-compose -f "system_test/docker-compose.yml" up -d --build | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.22' | |
- name: run test | |
run: VOTE_SYSTEM_TEST=1 go test -timeout 60s ./system_test/ |