Skip to content

[DNL] Test uploader rewrite #15463

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
167 changes: 1 addition & 166 deletions .github/actions/analytics-uploader-wrapper/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,23 +36,8 @@ inputs:
runs:
using: composite
steps:
- name: Upload test results with CLI version ${{ inputs.cli-version }} to prod
if: "${{ inputs.cli-version != '' }}"
continue-on-error: true
uses: trunk-io/analytics-uploader@main
with:
org-slug: trunk
token: ${{ inputs.token-prod }}
cli-version: ${{ inputs.cli-version }}
junit-paths: ${{ inputs.junit-paths }}
bazel-bep-path: ${{ inputs.bazel-bep-path }}
run: ${{ inputs.run }}
quarantine: false

- 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
uses: trunk-io/analytics-uploader@gabe/test
with:
org-slug: trunk-staging-org
token: ${{ inputs.token-staging }}
Expand All @@ -63,153 +48,3 @@ runs:
quarantine: true
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 != '' }}"
continue-on-error: true
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 }}
bazel-bep-path: ${{ inputs.bazel-bep-path }}
run: ${{ inputs.run }}
quarantine: true
env:
TRUNK_PUBLIC_API_ADDRESS: https://api.dev.trunk-staging.io/
DISABLE_SENTRY: true

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

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

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

- name: Upload test results with default CLI version to prod
if: "${{ inputs.cli-version == '' }}"
continue-on-error: true
uses: trunk-io/analytics-uploader@main
with:
org-slug: trunk
token: ${{ inputs.token-prod }}
junit-paths: ${{ inputs.junit-paths }}
bazel-bep-path: ${{ inputs.bazel-bep-path }}
run: ${{ inputs.run }}
quarantine: false

- 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
token: ${{ inputs.token-staging }}
junit-paths: ${{ inputs.junit-paths }}
bazel-bep-path: ${{ inputs.bazel-bep-path }}
run: ${{ inputs.run }}
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 == '' }}"
continue-on-error: true
uses: trunk-io/analytics-uploader@main
with:
org-slug: trunk-io
token: ${{ inputs.token-dev }}
junit-paths: ${{ inputs.junit-paths }}
bazel-bep-path: ${{ inputs.bazel-bep-path }}
run: ${{ inputs.run }}
quarantine: true
env:
TRUNK_PUBLIC_API_ADDRESS: https://api.dev.trunk-staging.io
DISABLE_SENTRY: true

- name: Upload test results with default CLI version to dev2
if: "${{ inputs.cli-version == '' }}"
continue-on-error: true
uses: trunk-io/analytics-uploader@main
with:
org-slug: trunk-io
token: ${{ inputs.token-dev2 }}
junit-paths: ${{ inputs.junit-paths }}
bazel-bep-path: ${{ inputs.bazel-bep-path }}
run: ${{ inputs.run }}
quarantine: true
env:
TRUNK_PUBLIC_API_ADDRESS: https://api.dev2.trunk-staging.io
DISABLE_SENTRY: true

- name: Upload test results with default CLI version to dev3
if: "${{ inputs.cli-version == '' }}"
continue-on-error: true
uses: trunk-io/analytics-uploader@main
with:
org-slug: trunk-io
token: ${{ inputs.token-dev3 }}
junit-paths: ${{ inputs.junit-paths }}
bazel-bep-path: ${{ inputs.bazel-bep-path }}
run: ${{ inputs.run }}
quarantine: true
env:
TRUNK_PUBLIC_API_ADDRESS: https://api.dev3.trunk-staging.io
DISABLE_SENTRY: true

# Do not continue-on-error for last upload
- name: Upload test results with default CLI version to dev4
if: "${{ inputs.cli-version == '' }}"
uses: trunk-io/analytics-uploader@main
with:
org-slug: trunk-io
token: ${{ inputs.token-dev4 }}
junit-paths: ${{ inputs.junit-paths }}
bazel-bep-path: ${{ inputs.bazel-bep-path }}
run: ${{ inputs.run }}
quarantine: true
env:
TRUNK_PUBLIC_API_ADDRESS: https://api.dev4.trunk-staging.io
DISABLE_SENTRY: true
6 changes: 3 additions & 3 deletions .github/workflows/java-tests.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Java Tests
permissions: read-all

on:
schedule:
Expand All @@ -18,7 +19,6 @@ on:
jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

Expand All @@ -30,7 +30,7 @@ jobs:
cache: maven

- name: Run tests with Gradle
if: ${{ always() }}
continue-on-error: true
uses: ./.github/actions/analytics-uploader-wrapper
with:
token-staging: ${{ secrets.TRUNK_STAGING_ORG_API_TOKEN }}
Expand All @@ -41,7 +41,7 @@ jobs:
token-dev4: ${{ secrets.TRUNK_DEV4_ORG_API_TOKEN }}
cli-version: ${{ inputs.cli-version }}
junit-paths: "**/gradle/**/test-results/**/*.xml"
run: gradle test --project-dir java/gradle
run: gradle test --project-dir java/gradle && exit 1

- name: Run tests with Maven
if: ${{ always() }}
Expand Down
Loading