-
Notifications
You must be signed in to change notification settings - Fork 0
113 lines (107 loc) · 3.47 KB
/
Copy pathtest.yaml
File metadata and controls
113 lines (107 loc) · 3.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
#
# DO NOT EDIT THIS FILE
#
# It is automatically copied from https://github.com/pion/.goassets repository.
# If this repository should have package specific CI config,
# remove the repository name from .goassets/.github/workflows/assets-sync.yml.
#
# If you want to update the shared CI config, send a PR to
# https://github.com/pion/.goassets instead of this repository.
#
# SPDX-FileCopyrightText: 2026 The Pion community <https://pion.ly>
# SPDX-License-Identifier: MIT
name: Test
on:
push:
branches:
- main
- warp*
pull_request:
jobs:
# Inlined from pion/.goassets test.reusable.yml so a failed Codecov upload
# (this fork may have no CODECOV_TOKEN, and tokenless uploads are rejected)
# does not fail CI. Keeps the coverage upload but with fail_ci_if_error:
# false, so it resumes reporting automatically once a token is added.
test:
runs-on: ubuntu-24.04
name: Go ${{ matrix.go }}
permissions:
contents: read
strategy:
matrix:
go: ["1.25", "1.24"] # auto-update/supported-go-version-list
fail-fast: false
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
- uses: actions/cache@v6
with:
path: |
~/go/pkg/mod
~/go/bin
~/.cache
key: ${{ runner.os }}-amd64-go-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-amd64-go-
- name: Setup Go
uses: actions/setup-go@v6
with:
go-version: ${{ matrix.go }}
- name: Setup go-acc
run: go install github.com/ory/go-acc@latest
- 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: |
if [ -f .github/.ci.conf ]; then . .github/.ci.conf; fi
set -euo pipefail
go-acc -o cover.out ./... -- -bench=. -v -race 2>&1 | tee /tmp/gotest.log
- 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
- name: Upload test log
uses: actions/upload-artifact@v7
if: always()
with:
name: test-log-${{ matrix.go }}
path: /tmp/gotest.log
if-no-files-found: error
- uses: codecov/codecov-action@v7
continue-on-error: true
with:
fail_ci_if_error: false
flags: go
name: codecov-umbrella
token: ${{ secrets.CODECOV_TOKEN }}
test-i386:
uses: pion/.goassets/.github/workflows/test-i386.reusable.yml@main
strategy:
matrix:
go: ["1.25", "1.24"] # auto-update/supported-go-version-list
fail-fast: false
with:
go-version: ${{ matrix.go }}
test-windows:
uses: pion/.goassets/.github/workflows/test-windows.reusable.yml@main
strategy:
matrix:
go: ["1.25", "1.24"] # auto-update/supported-go-version-list
fail-fast: false
with:
go-version: ${{ matrix.go }}
test-macos:
uses: pion/.goassets/.github/workflows/test-macos.reusable.yml@main
strategy:
matrix:
go: ["1.25", "1.24"] # auto-update/supported-go-version-list
fail-fast: false
with:
go-version: ${{ matrix.go }}
test-wasm:
uses: pion/.goassets/.github/workflows/test-wasm.reusable.yml@main
with:
go-version: "1.25" # auto-update/latest-go-version
secrets: inherit