-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Baseline for acceptance tests * Refine the acceptance testing framework and the test cases * Run acceptance tests as part of the CI * Update to Go v1.21 (CI) * Downgrade to golang.org/x/[email protected] * Use specific go build flag for acceptance tests
- Loading branch information
Showing
11 changed files
with
522 additions
and
20 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,27 @@ | ||
name: Test & Build | ||
|
||
on: | ||
pull_request: | ||
push: | ||
paths: | ||
- 'cmd/**' | ||
- 'internal/**' | ||
- 'acceptance/**' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
go: ['1.20'] | ||
go: [ '1.21' ] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v4 | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: ${{ matrix.go }} | ||
- name: Run Tests... | ||
- name: Run unit tests | ||
run: go test -v -vet=off -race ./... | ||
- name: Build... | ||
run: go build -race cmd/killgrave/main.go | ||
- name: Run acceptance tests | ||
run: make acceptance |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
.PHONY: build | ||
.PHONY: build acceptance | ||
|
||
build: | ||
go build -ldflags "-s -w -X 'github.com/friendsofgo/killgrave/internal/app/cmd._version=`git rev-parse --abbrev-ref HEAD`-`git rev-parse --short HEAD`'" -o bin/killgrave cmd/killgrave/main.go | ||
go build -ldflags "-s -w -X 'github.com/friendsofgo/killgrave/internal/app/cmd._version=`git rev-parse --abbrev-ref HEAD`-`git rev-parse --short HEAD`'" -o bin/killgrave cmd/killgrave/main.go | ||
|
||
acceptance: build | ||
@(cd acceptance && go test -count=1 -tags=acceptance -v ./...) |
Oops, something went wrong.