-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run tests in GitHub workflow instead of Docker
- Loading branch information
Showing
3 changed files
with
31 additions
and
76 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 |
---|---|---|
|
@@ -25,14 +25,36 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Build docker image | ||
run: | | ||
docker build \ | ||
-t sip-test \ | ||
-f ./build/test/Dockerfile . | ||
- name: Install Opus dependencies | ||
run: sudo apt-get update && sudo apt-get install -y libopus-dev libopusfile-dev | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: "1.22.5" | ||
|
||
- name: Set up gotestfmt | ||
run: go install github.com/gotesttools/gotestfmt/v2/cmd/[email protected] | ||
|
||
- name: Run tests | ||
- name: Static Check | ||
uses: dominikh/[email protected] | ||
with: | ||
checks: '["all", "-ST1000", "-ST1003", "-ST1016", "-ST1020", "-ST1021", "-ST1022", "-SA1019"]' | ||
version: "2023.1.3" | ||
install-go: false | ||
|
||
- name: Test | ||
run: | | ||
docker run --rm \ | ||
-e GITHUB_WORKFLOW=1 \ | ||
sip-test | ||
set -euo pipefail | ||
go test -race -json -v -coverprofile=coverage.out -covermode=atomic ./... 2>&1 | tee /tmp/gotest.log | gotestfmt | ||
- name: Upload test log | ||
uses: actions/upload-artifact@v3 | ||
if: always() | ||
with: | ||
name: test-log | ||
path: /tmp/gotest.log | ||
if-no-files-found: error | ||
|
||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v3 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.