Skip to content

Commit

Permalink
[forge] Add junit support
Browse files Browse the repository at this point in the history
Add junit support for forge

This will allow us to onboard forge onto trunk flaky test detection

Also make suite choice more clean

Test Plan: running on PR
  • Loading branch information
perryjrandall committed Oct 22, 2024
1 parent fbf09ce commit d165f44
Show file tree
Hide file tree
Showing 12 changed files with 766 additions and 529 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/workflow-run-forge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ on:
required: false
type: string
description: The deployer profile used to spin up and configure forge infrastructure
SEND_RESULTS_TO_TRUNK:
required: false
type: boolean
description: Send forge results to trunk.io

env:
AWS_ACCOUNT_NUM: ${{ secrets.ENV_ECR_AWS_ACCOUNT_NUM }}
Expand Down Expand Up @@ -118,6 +122,7 @@ env:
VERBOSE: true
FORGE_NUM_VALIDATORS: ${{ inputs.FORGE_NUM_VALIDATORS }}
FORGE_NUM_VALIDATOR_FULLNODES: ${{ inputs.FORGE_NUM_VALIDATOR_FULLNODES }}
FORGE_JUNIT_XML_PATH: ${{ inputs.SEND_RESULTS_TO_TRUNK ? '/tmp/test.xml' : '' }}

# TODO: should we migrate this to a composite action, so that we can skip it
# at the call site, and don't need to wrap each step in an if statement?
Expand Down Expand Up @@ -228,3 +233,14 @@ jobs:
# Print out whether the job was skipped.
- run: echo "Skipping forge test!"
if: ${{ inputs.SKIP_JOB }}

- name: Upload results
# Run this step even if the test step ahead fails
if: "!cancelled() && ${{ inputs.SEND_RESULTS_TO_TRUNK }}"
uses: trunk-io/analytics-uploader@main
with:
# Configured in the nextest.toml file
junit-paths: ${{ env.FORGE_JUNIT_XML_PATH }}
org-slug: aptoslabs
token: ${{ secrets.TRUNK_API_TOKEN }}
continue-on-error: true
124 changes: 101 additions & 23 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d165f44

Please sign in to comment.