This repository has been archived by the owner on Oct 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 183
82 lines (69 loc) · 1.98 KB
/
perf-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
name: perf-tests
on:
push:
branches:
- main
pull_request:
concurrency:
group: perf-tests-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
RESULT_PATH: testresults
GO_VERSION: 1.18.7
PYTHON_VERSION: '3.9'
REQUIREMENTS_PATH: "tests/requirements.txt"
jobs:
perf-tests:
name: perf-tests
runs-on: ubuntu-20.04
steps:
- name: Check out the codebase.
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ${{ env.GO_VERSION }}
- name: Caching dependency
uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
~/go/bin
key: ${{ runner.os }}-v1-go-mod-${{ hashFiles('**/go.mod') }}-${{ hashFiles('**/go.sum') }}
- name: go mod download
run: |
[[ -d ~/go/pkg/mod ]] && exit 0
# retry up to 3 times in case of network issues
for i in $(seq 1 3); do
go mod download && exit 0
sleep 10
done
exit 1
- name: Build agent
run: |
make signalfx-agent
echo "AGENT_BIN=$(pwd)/signalfx-agent" >> $GITHUB_ENV
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Caching dependency
uses: actions/cache@v3
with:
path: |
~/.cache/pip
key: v1-pytest-${{ env.PYTHON_VERSION }}-${{ hashFiles(env.REQUIREMENTS_PATH) }}
- name: Install pytest
run: pip install -r "${{ env.REQUIREMENTS_PATH }}"
- name: Run pytest
env:
MARKERS: perf_test
WORKERS: 1
TESTS_DIR: ./tests
run: .github/scripts/run-pytest.sh
- name: Uploading test results
uses: actions/upload-artifact@v3
with:
name: perf-test-results
path: ~/${{ env.RESULT_PATH }}