Skip to content

Commit

Permalink
Run tests in GitHub workflow instead of Docker
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean-Der committed Dec 6, 2023
1 parent 924b6e8 commit 2b0587b
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 76 deletions.
38 changes: 29 additions & 9 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,34 @@ 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: apt-get update && apt-get install -y libopus-dev libopusfile-dev

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.21"

- 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
MallocNanoZone=0 go test -race -json -v ./... 2>&1 | tee /tmp/gotest.log | gotestfmt
# Upload the original go test log as an artifact for later review.
- name: Upload test log
uses: actions/upload-artifact@v3
if: always()
with:
name: test-log
path: /tmp/gotest.log
if-no-files-found: error
42 changes: 0 additions & 42 deletions build/test/Dockerfile

This file was deleted.

25 changes: 0 additions & 25 deletions build/test/entrypoint.sh

This file was deleted.

0 comments on commit 2b0587b

Please sign in to comment.