Skip to content

Commit dffbd0f

Browse files
author
Pat
authored
workflows: switch perf test to dedicated VMs (fluent#5625)
* workflows: switch to dedicated VM for perf-test Signed-off-by: Patrick Stephens <[email protected]> * workflows: update to use reusable job for perf-test Signed-off-by: Patrick Stephens <[email protected]> * workflows: update to use reusable job for perf-test Signed-off-by: Patrick Stephens <[email protected]> * workflows: use correct name for secret Signed-off-by: Patrick Stephens <[email protected]>
1 parent d059a5a commit dffbd0f

File tree

1 file changed

+17
-44
lines changed

1 file changed

+17
-44
lines changed

.github/workflows/pr-perf-test.yaml

Lines changed: 17 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -8,62 +8,35 @@ on:
88

99
jobs:
1010

11-
# TODO: switch to dedicated runner workflow
1211
pr-perf-test-run:
1312
# We only need to test this once as the rest are chained from it.
1413
if: contains(github.event.pull_request.labels.*.name, 'ok-to-performance-test')
15-
name: Run performance tests for PR
16-
runs-on: ubuntu-20.04
17-
steps:
18-
- uses: actions/checkout@v3
19-
20-
- name: Install dependencies
21-
run: |
22-
sudo apt update
23-
sudo apt-get install -y jq
24-
25-
# Install docker-compose
26-
# Later versions have an SSL issue on this OS for remote repository builds
27-
sudo curl --fail --silent -L "https://github.com/docker/compose/releases/download/1.25.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
28-
sudo chmod a+x /usr/local/bin/docker-compose
14+
uses: fluent/fluent-bit-ci/.github/workflows/call-run-test.yaml@main
15+
with:
16+
vm-name: fb-perf-test-pr-${{ github.event.number }}
17+
git-branch: ${{ github.head_ref }}
18+
test-directory: examples/perf_test
19+
duration: 30
20+
service: fb-delta
21+
secrets:
22+
service-account: ${{ secrets.GCP_SA_KEY }}
2923

30-
# Add promplot
31-
curl --fail --silent -L https://github.com/qvl/promplot/releases/download/v0.17.0/promplot_0.17.0_linux_64bit.tar.gz| tar -xz
32-
chmod a+x ./promplot
33-
sudo mv -vf ./promplot /usr/local/bin/promplot
34-
shell: bash
35-
36-
- name: Run the tests on this runner
37-
timeout-minutes: 45
38-
run: |
39-
curl -L https://raw.githubusercontent.com/fluent/fluent-bit-ci/master/scripts/docker-compose-monitor.sh | bash
40-
shell: bash
41-
env:
42-
TEST_DIRECTORY: ./examples/perf_test
43-
SERVICE_TO_MONITOR: fb-delta
44-
RUN_TIMEOUT_MINUTES: 30
24+
pr-perf-test-complete:
25+
name: PR - performance test complete
26+
runs-on: ubuntu-latest
27+
needs:
28+
- pr-perf-test-run
29+
steps:
30+
- uses: actions/download-artifact@v3
4531

4632
- name: Upload plots
4733
continue-on-error: true
4834
uses: edunad/[email protected]
4935
with:
50-
path: './output/*.png'
36+
path: './**/*.png'
5137
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5238

53-
- name: Upload any results
54-
if: always()
55-
uses: actions/upload-artifact@v3
56-
with:
57-
name: output
58-
path: output/
5939

60-
pr-perf-test-complete:
61-
name: PR - performance test complete
62-
runs-on: ubuntu-latest
63-
needs:
64-
- pr-perf-test-run
65-
steps:
66-
# TODO: post results as well
6740
- uses: actions-ecosystem/action-add-labels@v1
6841
name: Label the PR
6942
with:

0 commit comments

Comments
 (0)