|
8 | 8 |
|
9 | 9 | jobs: |
10 | 10 |
|
11 | | - # TODO: switch to dedicated runner workflow |
12 | 11 | pr-perf-test-run: |
13 | 12 | # We only need to test this once as the rest are chained from it. |
14 | 13 | 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 }} |
29 | 23 |
|
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 |
45 | 31 |
|
46 | 32 | - name: Upload plots |
47 | 33 | continue-on-error: true |
48 | 34 | |
49 | 35 | with: |
50 | | - path: './output/*.png' |
| 36 | + path: './**/*.png' |
51 | 37 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
52 | 38 |
|
53 | | - - name: Upload any results |
54 | | - if: always() |
55 | | - uses: actions/upload-artifact@v3 |
56 | | - with: |
57 | | - name: output |
58 | | - path: output/ |
59 | 39 |
|
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 |
67 | 40 | - uses: actions-ecosystem/action-add-labels@v1 |
68 | 41 | name: Label the PR |
69 | 42 | with: |
|
0 commit comments