patched v0.1.37 #2
This file contains hidden or 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
# SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly> | |
# SPDX-License-Identifier: MIT | |
name: Test | |
on: | |
push: | |
workflow_call: | |
inputs: | |
go-version: | |
required: true | |
type: string | |
permissions: | |
contents: read | |
jobs: | |
test: | |
runs-on: ubuntu-24.04 | |
strategy: | |
matrix: | |
go-version: ['1.22', '1.23'] | |
name: Go ${{ matrix.go-version }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Setup go-acc | |
run: go install github.com/ory/go-acc@latest | |
- name: Setup gotestfmt | |
uses: haveyoudebuggedit/gotestfmt-action@v2 | |
- name: Run pre test hook | |
run: | | |
if [ -f .github/.ci.conf ]; then . .github/.ci.conf; fi | |
if [ -n "${PRE_TEST_HOOK}" ]; then ${PRE_TEST_HOOK}; fi | |
- name: Run test | |
run: | | |
TEST_BENCH_OPTION="-bench=." | |
if [ -f .github/.ci.conf ]; then . .github/.ci.conf; fi | |
set -euo pipefail | |
go-acc -o cover.out ./... -- \ | |
${TEST_BENCH_OPTION} \ | |
-json \ | |
-v -race 2>&1 | grep -v '^go: downloading' | tee /tmp/gotest.log | gotestfmt | |
- name: Run post test hook | |
run: | | |
if [ -f .github/.ci.conf ]; then . .github/.ci.conf; fi | |
if [ -n "${POST_TEST_HOOK}" ]; then ${POST_TEST_HOOK}; fi |