Skip to content

Commit

Permalink
Merge pull request #9528 from trunk-io/pat/AddUploadToDev
Browse files Browse the repository at this point in the history
Add uploads to dev
  • Loading branch information
pat-trunk-io authored Oct 25, 2024
2 parents 6a4e877 + ad2e6d7 commit addfa15
Show file tree
Hide file tree
Showing 10 changed files with 47 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/actions/analytics-uploader-wrapper/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ inputs:
token-prod:
description: Organization token for prod.
required: true
token-dev:
description: Organization token for dev.
required: true
junit-paths:
description: Comma-separated list of glob paths to junit files.
required: true
Expand Down Expand Up @@ -35,6 +38,7 @@ runs:

- name: Upload test results with CLI version ${{ inputs.cli-version }} to staging
if: "${{ inputs.cli-version != '' }}"
continue-on-error: true
uses: trunk-io/analytics-uploader@main
with:
org-slug: trunk-staging-org
Expand All @@ -46,6 +50,19 @@ runs:
env:
TRUNK_PUBLIC_API_ADDRESS: https://api.trunk-staging.io

- name: Upload test results with CLI version ${{ inputs.cli-version }} to dev
if: "${{ inputs.cli-version != '' }}"
uses: trunk-io/analytics-uploader@main
with:
org-slug: trunk-io
token: ${{ inputs.token-dev }}
cli-version: ${{ inputs.cli-version }}
junit-paths: ${{ inputs.junit-paths }}
run: ${{ inputs.run }}
quarantine: true
env:
TRUNK_PUBLIC_API_ADDRESS: https://api.dev.trunk-staging.io/

- name: Upload test results with default CLI version to prod
if: "${{ inputs.cli-version == '' }}"
continue-on-error: true
Expand All @@ -59,6 +76,7 @@ runs:

- name: Upload test results with default CLI version to staging
if: "${{ inputs.cli-version == '' }}"
continue-on-error: true
uses: trunk-io/analytics-uploader@main
with:
org-slug: trunk-staging-org
Expand All @@ -68,3 +86,15 @@ runs:
quarantine: true
env:
TRUNK_PUBLIC_API_ADDRESS: https://api.trunk-staging.io

- name: Upload test results with default CLI version to dev
if: "${{ inputs.cli-version == '' }}"
uses: trunk-io/analytics-uploader@main
with:
org-slug: trunk-io
token: ${{ inputs.token-dev }}
junit-paths: ${{ inputs.junit-paths }}
run: ${{ inputs.run }}
quarantine: true
env:
TRUNK_PUBLIC_API_ADDRESS: https://api.dev.trunk-staging.io
1 change: 1 addition & 0 deletions .github/workflows/bazel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,6 @@ jobs:
with:
token-staging: ${{ secrets.TRUNK_STAGING_ORG_API_TOKEN }}
token-prod: ${{ secrets.TRUNK_PROD_ORG_API_TOKEN }}
token-dev: ${{ secrets.TRUNK_DEV_ORG_API_TOKEN }}
cli-version: ${{ inputs.cli-version }}
junit-paths: bazel-testlogs/**/test.xml
2 changes: 2 additions & 0 deletions .github/workflows/go.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jobs:
with:
token-staging: ${{ secrets.TRUNK_STAGING_ORG_API_TOKEN }}
token-prod: ${{ secrets.TRUNK_PROD_ORG_API_TOKEN }}
token-dev: ${{ secrets.TRUNK_DEV_ORG_API_TOKEN }}
cli-version: ${{ inputs.cli-version }}
junit-paths: "**/go-junit-report_test.xml"

Expand All @@ -68,6 +69,7 @@ jobs:
with:
token-staging: ${{ secrets.TRUNK_STAGING_ORG_API_TOKEN }}
token-prod: ${{ secrets.TRUNK_PROD_ORG_API_TOKEN }}
token-dev: ${{ secrets.TRUNK_DEV_ORG_API_TOKEN }}
cli-version: ${{ inputs.cli-version }}
junit-paths: "**/gotestsum_test.xml"

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/java-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
with:
token-staging: ${{ secrets.TRUNK_STAGING_ORG_API_TOKEN }}
token-prod: ${{ secrets.TRUNK_PROD_ORG_API_TOKEN }}
token-dev: ${{ secrets.TRUNK_DEV_ORG_API_TOKEN }}
cli-version: ${{ inputs.cli-version }}
junit-paths: "**/gradle/**/test-results/**/*.xml"
run: gradle test --project-dir java/gradle
Expand All @@ -45,6 +46,7 @@ jobs:
with:
token-staging: ${{ secrets.TRUNK_STAGING_ORG_API_TOKEN }}
token-prod: ${{ secrets.TRUNK_PROD_ORG_API_TOKEN }}
token-dev: ${{ secrets.TRUNK_DEV_ORG_API_TOKEN }}
cli-version: ${{ inputs.cli-version }}
junit-paths: "**/surefire-reports/*.xml"
run: mvn test --file java/maven/pom.xml --quiet
Expand All @@ -55,6 +57,7 @@ jobs:
with:
token-staging: ${{ secrets.TRUNK_STAGING_ORG_API_TOKEN }}
token-prod: ${{ secrets.TRUNK_PROD_ORG_API_TOKEN }}
token-dev: ${{ secrets.TRUNK_DEV_ORG_API_TOKEN }}
cli-version: ${{ inputs.cli-version }}
junit-paths: "**/playwright/**/surefire-reports/*.xml"
run: mvn test --file java/playwright/pom.xml --quiet
4 changes: 4 additions & 0 deletions .github/workflows/javascript-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ jobs:
with:
token-staging: ${{ secrets.TRUNK_STAGING_ORG_API_TOKEN }}
token-prod: ${{ secrets.TRUNK_PROD_ORG_API_TOKEN }}
token-dev: ${{ secrets.TRUNK_DEV_ORG_API_TOKEN }}
cli-version: ${{ inputs.cli-version }}
junit-paths: "**/mocha_test.xml"
run: npm run mocha-test
Expand All @@ -50,6 +51,7 @@ jobs:
with:
token-staging: ${{ secrets.TRUNK_STAGING_ORG_API_TOKEN }}
token-prod: ${{ secrets.TRUNK_PROD_ORG_API_TOKEN }}
token-dev: ${{ secrets.TRUNK_DEV_ORG_API_TOKEN }}
cli-version: ${{ inputs.cli-version }}
junit-paths: "**/*_test.xml,**/junitresults-*.xml"
run: npm run jest-test
Expand All @@ -60,6 +62,7 @@ jobs:
with:
token-staging: ${{ secrets.TRUNK_STAGING_ORG_API_TOKEN }}
token-prod: ${{ secrets.TRUNK_PROD_ORG_API_TOKEN }}
token-dev: ${{ secrets.TRUNK_DEV_ORG_API_TOKEN }}
cli-version: ${{ inputs.cli-version }}
junit-paths: "**/*_test.xml,**/junitresults-*.xml"
run: npm run jasmine-test
Expand All @@ -70,6 +73,7 @@ jobs:
with:
token-staging: ${{ secrets.TRUNK_STAGING_ORG_API_TOKEN }}
token-prod: ${{ secrets.TRUNK_PROD_ORG_API_TOKEN }}
token-dev: ${{ secrets.TRUNK_DEV_ORG_API_TOKEN }}
cli-version: ${{ inputs.cli-version }}
junit-paths: "**/*_test.xml,**/junitresults-*.xml"
run: npm run playwright-test
1 change: 1 addition & 0 deletions .github/workflows/php.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ jobs:
with:
token-staging: ${{ secrets.TRUNK_STAGING_ORG_API_TOKEN }}
token-prod: ${{ secrets.TRUNK_PROD_ORG_API_TOKEN }}
token-dev: ${{ secrets.TRUNK_DEV_ORG_API_TOKEN }}
cli-version: ${{ inputs.cli-version }}
junit-paths: "**/*_test.xml"
run:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/python-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
with:
token-staging: ${{ secrets.TRUNK_STAGING_ORG_API_TOKEN }}
token-prod: ${{ secrets.TRUNK_PROD_ORG_API_TOKEN }}
token-dev: ${{ secrets.TRUNK_DEV_ORG_API_TOKEN }}
cli-version: ${{ inputs.cli-version }}
junit-paths: "**/*_test.xml"
run:
Expand All @@ -48,6 +49,7 @@ jobs:
with:
token-staging: ${{ secrets.TRUNK_STAGING_ORG_API_TOKEN }}
token-prod: ${{ secrets.TRUNK_PROD_ORG_API_TOKEN }}
token-dev: ${{ secrets.TRUNK_DEV_ORG_API_TOKEN }}
cli-version: ${{ inputs.cli-version }}
junit-paths: "**/*_test.xml"
run:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/retry-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ jobs:
with:
token-staging: ${{ secrets.TRUNK_STAGING_ORG_API_TOKEN }}
token-prod: ${{ secrets.TRUNK_PROD_ORG_API_TOKEN }}
token-dev: ${{ secrets.TRUNK_DEV_ORG_API_TOKEN }}
cli-version: ${{ inputs.cli-version }}
junit-paths: "**/python/results/*-behave.xml"

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ruby-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
with:
token-staging: ${{ secrets.TRUNK_STAGING_ORG_API_TOKEN }}
token-prod: ${{ secrets.TRUNK_PROD_ORG_API_TOKEN }}
token-dev: ${{ secrets.TRUNK_DEV_ORG_API_TOKEN }}
cli-version: ${{ inputs.cli-version }}
junit-paths: "**/rspec_test.xml"
run: bundle exec rspec ruby/rspec --format RspecJunitFormatter --out rspec_test.xml
Expand All @@ -43,6 +44,7 @@ jobs:
with:
token-staging: ${{ secrets.TRUNK_STAGING_ORG_API_TOKEN }}
token-prod: ${{ secrets.TRUNK_PROD_ORG_API_TOKEN }}
token-dev: ${{ secrets.TRUNK_DEV_ORG_API_TOKEN }}
cli-version: ${{ inputs.cli-version }}
junit-paths: "**/ruby/minitest/results/*.xml"
run: bundle exec ruby ruby/minitest/mixer.rb
1 change: 1 addition & 0 deletions .github/workflows/rust-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
with:
token-staging: ${{ secrets.TRUNK_STAGING_ORG_API_TOKEN }}
token-prod: ${{ secrets.TRUNK_PROD_ORG_API_TOKEN }}
token-dev: ${{ secrets.TRUNK_DEV_ORG_API_TOKEN }}
cli-version: ${{ inputs.cli-version }}
junit-paths: rust/**/nextest/ci/*junit.xml
run: cargo nextest run --profile=ci --manifest-path=./rust/Cargo.toml

0 comments on commit addfa15

Please sign in to comment.