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 d87a989
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 76 deletions.
40 changes: 31 additions & 9 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.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
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
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 d87a989

Please sign in to comment.