Skip to content

Commit

Permalink
Modify CI to upload e2e results
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin-dp committed Nov 6, 2024
1 parent 3e246bc commit d40390d
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ jobs:
defaults:
run:
working-directory: integration-tests
env:
BUILDKITE_ANALYTICS_TOKEN: ${{ secrets.BUILDKITE_TEST_ANALYTICS_E2E }}
steps:
- uses: actions/checkout@v4
- uses: erlef/setup-beam@v1
Expand Down Expand Up @@ -56,4 +58,28 @@ jobs:
- name: Setup lux
run: make
- name: Run integration tests
id: tests
run: ./run.sh
- name: Upload lux logs
uses: actions/upload-artifact@v3
if: ${{ failure() && steps.tests.outcome == 'failure' }}
with:
name: lux_logs
path: integration-tests/**/lux_logs/run_*
- name: Upload test results to Buildkite analytics
if: ${{ !cancelled() && steps.tests.outcome != 'skipped' && env.BUILDKITE_ANALYTICS_TOKEN != '' }}
working-directory: e2e/lux_logs/latest_run
run: |
curl \
-X POST \
--fail-with-body \
-H "Authorization: Token token=\"$BUILDKITE_ANALYTICS_TOKEN\"" \
-F "data=@lux_junit.xml" \
-F "format=junit" \
-F "run_env[CI]=github_actions" \
-F "run_env[key]=$GITHUB_ACTION-$GITHUB_RUN_NUMBER-$GITHUB_RUN_ATTEMPT" \
-F "run_env[number]=$GITHUB_RUN_NUMBER" \
-F "run_env[branch]=$GITHUB_REF" \
-F "run_env[commit_sha]=$GITHUB_SHA" \
-F "run_env[url]=https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" \
https://analytics-api.buildkite.com/v1/uploads

0 comments on commit d40390d

Please sign in to comment.