forked from open-telemetry/opentelemetry-collector-contrib
-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (82 loc) · 2.61 KB
/
stability-tests.yml
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
name: stability-tests
on:
push:
branches: [ main ]
tags:
- 'v[0-9]+.[0-9]+.[0-9]+*'
pull_request:
jobs:
setup-environment:
runs-on: ubuntu-latest
if: ${{ github.actor != 'dependabot[bot]' }}
outputs:
stabilitytest_matrix: ${{ steps.splitstabilitytest.outputs.stabilitytest_matrix}}
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.17
- name: Cache Go
id: go-cache
uses: actions/cache@v3
with:
path: |
~/go/bin
~/go/pkg/mod
~/.cache/go-build
key: stability-${{ runner.os }}-go-${{ hashFiles('**/go.mod', '**/go.sum') }}
- name: Install dependencies
if: steps.go-cache.outputs.cache-hit != 'true'
run: make -j2 gomoddownload
- name: Install Tools
if: steps.go-cache.outputs.cache-hit != 'true'
run: make install-tools
- name: Split Stability Jobs
id: splitstabilitytest
run: ./.github/workflows/scripts/setup_stability_tests.sh
stability-test:
# Stability tests disabled in the makefile, this job is currently running a noop make target
runs-on: ubuntu-latest
needs: [setup-environment]
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.setup-environment.outputs.stabilitytest_matrix) }}
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.17
- name: Cache Go
id: go-cache
uses: actions/cache@v3
with:
path: |
~/go/bin
~/go/pkg/mod
~/.cache/go-build
key: stability-${{ runner.os }}-go-${{ hashFiles('**/go.mod', '**/go.sum') }}
- name: Install Dependencies
if: steps.go-cache.outputs.cache-hit != 'true'
run: make -j2 gomoddownload
- name: Install Tools
if: steps.go-cache.outputs.cache-hit != 'true'
run: make install-tools
- name: Run Stability Tests
run: make stability-tests
env:
TEST_ARGS: "-test.run=${{ matrix.test }}"
- name: Create Test Result Archive
if: ${{ failure() || success() }}
continue-on-error: true
run: tar -cvf stabilitytest_results.tar testbed/stabilitytests/results
- name: Upload Test Results
if: ${{ success() }}
continue-on-error: true
uses: actions/upload-artifact@v3
with:
name: stability-test-results
path: stabilitytest_results.tar