Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run tests in GitHub workflow instead of Docker #15

Merged
merged 1 commit into from
Dec 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.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
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.

Loading