Skip to content
Merged
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
3 changes: 2 additions & 1 deletion .github/actions/perform_smoke_test/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,8 @@ runs:
./${{ inputs.cli-binary-location }} upload \
--org-url-slug trunk \
--junit-paths "${{ github.workspace }}/target/**/*junit.xml" \
--token ${{ inputs.production-api-token }}
--token ${{ inputs.production-api-token }} \
--test-collection-id 4B2wfoEU
- name: Upload to production with public repo id
id: production-upload-public-repo-id
Expand Down
6 changes: 6 additions & 0 deletions .github/actions/test_ruby_gem_uploads/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ inputs:
test-collection-id:
description: Optional 8 character alphanumeric ID for a test collection
required: false
variant:
description: Optional variant label to distinguish uploads within a matrix
required: false
knapsack-pro-test-suite-token-rspec:
description: Optional Knapsack Pro test suite token for RSpec
required: true
Expand Down Expand Up @@ -87,6 +90,7 @@ runs:
TRUNK_ORG_URL_SLUG: ${{ inputs.trunk-org-slug }}
TRUNK_API_TOKEN: ${{ inputs.trunk-token }}
TRUNK_TEST_COLLECTION_ID: ${{ inputs.test-collection-id }}
TRUNK_VARIANT: ${{ inputs.variant }}

- name: Run variant quarantine test without variant (should fail - not quarantined)
id: run-variant-test-no-variant
Expand Down Expand Up @@ -171,6 +175,8 @@ runs:
TRUNK_API_TOKEN: ${{ inputs.trunk-token }}
TRUNK_ORG_URL_SLUG: ${{ inputs.trunk-org-slug }}
TRUNK_PUBLIC_API_ADDRESS: ${{ inputs.trunk-public-api-address }}
TRUNK_TEST_COLLECTION_ID: ${{ inputs.test-collection-id }}
TRUNK_VARIANT: ${{ inputs.variant }}
TRUNK_LOCAL_UPLOAD_DIR: bundles
run: |
set -euo pipefail
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,8 @@ jobs:
target/${{ matrix.platform.target }}/release/trunk-analytics-cli upload \
--junit-paths ${{ github.workspace }}/target/**/*junit.xml \
--org-url-slug trunk \
--token ${{ secrets.TRUNK_PROD_ORG_API_TOKEN }}
--token ${{ secrets.TRUNK_PROD_ORG_API_TOKEN }} \
--test-collection-id EWhNPVic
trunk_check_runner:
name: Trunk Check runner [linux]
Expand Down
19 changes: 18 additions & 1 deletion .github/workflows/release_ruby_gem.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,29 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: ./.github/actions/test_ruby_gem_uploads
- name: Test ruby gem uploads → analytics-cli-ruby-gem (staging)
uses: ./.github/actions/test_ruby_gem_uploads
with:
ruby-version: ${{ matrix.ruby-version }}
trunk-token: ${{ secrets.TRUNK_STAGING_ORG_API_TOKEN }}
trunk-public-api-address: https://api.trunk-staging.io
trunk-org-slug: trunk-staging-org
test-collection-id: T5yKSn9h
platform: ${{ matrix.platform.name }}
variant: ${{ matrix.platform.name }}-ruby${{ matrix.ruby-version }}
artifact-pattern: cross-gem-${{ matrix.platform.name }}
knapsack-pro-test-suite-token-rspec: ${{ secrets.KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC }}

- name: Test ruby gem uploads → analytics-cli-ruby-gem (prod)
uses: ./.github/actions/test_ruby_gem_uploads
with:
ruby-version: ${{ matrix.ruby-version }}
trunk-token: ${{ secrets.TRUNK_PROD_ORG_API_TOKEN }}
trunk-public-api-address: https://api.trunk.io
trunk-org-slug: trunk
test-collection-id: BiBP2neA
platform: ${{ matrix.platform.name }}
variant: ${{ matrix.platform.name }}-ruby${{ matrix.ruby-version }}
artifact-pattern: cross-gem-${{ matrix.platform.name }}
knapsack-pro-test-suite-token-rspec: ${{ secrets.KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC }}

Expand Down
88 changes: 85 additions & 3 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,61 @@ jobs:
- name: Setup Ruby
uses: ./.github/actions/setup_ruby

- name: Build CLI
run: cargo build -p trunk-analytics-cli

- name: Test ruby package
if: "!cancelled()"
run: |
bundle install
bundle exec rake test
working-directory: rspec-trunk-flaky-tests
env:
TRUNK_LOCAL_UPLOAD_DIR: ../upload_bundle

- name: Upload ruby package results → analytics-cli-ruby-gem (staging)
if: "!cancelled()"
run: |
./target/debug/trunk-analytics-cli upload \
--org-url-slug trunk-staging-org \
--token ${{ secrets.TRUNK_STAGING_ORG_API_TOKEN }} \
--test-reports ./upload_bundle/trunk_output.bin \
--test-collection-id T5yKSn9h
env:
TRUNK_PUBLIC_API_ADDRESS: https://api.trunk-staging.io

- name: Upload ruby package results → analytics-cli-ruby-gem (prod)
if: "!cancelled()"
run: |
./target/debug/trunk-analytics-cli upload \
--org-url-slug trunk \
--token ${{ secrets.TRUNK_PROD_ORG_API_TOKEN }} \
--test-reports ./upload_bundle/trunk_output.bin \
--test-collection-id BiBP2neA
env:
TRUNK_PUBLIC_API_ADDRESS: https://api.trunk.io

- name: Upload ruby package results → analytics-cli-smoke-tests (staging)
if: "!cancelled()"
run: |
./target/debug/trunk-analytics-cli upload \
--org-url-slug trunk-staging-org \
--token ${{ secrets.TRUNK_STAGING_ORG_API_TOKEN }} \
--test-reports ./upload_bundle/trunk_output.bin \
--test-collection-id z2dzjLHm
env:
TRUNK_PUBLIC_API_ADDRESS: https://api.trunk-staging.io
TRUNK_ORG_URL_SLUG: trunk-staging-org
TRUNK_API_TOKEN: ${{ secrets.TRUNK_STAGING_ORG_API_TOKEN }}

- name: Upload ruby package results → analytics-cli-smoke-tests (prod)
if: "!cancelled()"
run: |
./target/debug/trunk-analytics-cli upload \
--org-url-slug trunk \
--token ${{ secrets.TRUNK_PROD_ORG_API_TOKEN }} \
--test-reports ./upload_bundle/trunk_output.bin \
--test-collection-id 4B2wfoEU
env:
TRUNK_PUBLIC_API_ADDRESS: https://api.trunk.io

- name: Validate ruby platform gem
if: "!cancelled()"
Expand Down Expand Up @@ -112,7 +157,8 @@ jobs:
name: ruby-gem-pr
path: .github/actions/test_ruby_gem_uploads/

- uses: ./.github/actions/test_ruby_gem_uploads
- name: Test ruby gem uploads → analytics-cli-ruby-gem (staging)
uses: ./.github/actions/test_ruby_gem_uploads
with:
ruby-version: "3.4"
trunk-token: ${{ secrets.TRUNK_STAGING_ORG_API_TOKEN }}
Expand All @@ -122,3 +168,39 @@ jobs:
platform: x86_64-linux
artifact-pattern: ""
knapsack-pro-test-suite-token-rspec: ${{ secrets.KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC }}

- name: Test ruby gem uploads → analytics-cli-ruby-gem (prod)
uses: ./.github/actions/test_ruby_gem_uploads
with:
ruby-version: "3.4"
trunk-token: ${{ secrets.TRUNK_PROD_ORG_API_TOKEN }}
trunk-public-api-address: https://api.trunk.io
trunk-org-slug: trunk
test-collection-id: BiBP2neA
platform: x86_64-linux
artifact-pattern: ""
knapsack-pro-test-suite-token-rspec: ${{ secrets.KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC }}

- name: Test ruby gem uploads → analytics-cli-smoke-tests (staging)
uses: ./.github/actions/test_ruby_gem_uploads
with:
ruby-version: "3.4"
trunk-token: ${{ secrets.TRUNK_STAGING_ORG_API_TOKEN }}
trunk-public-api-address: https://api.trunk-staging.io
trunk-org-slug: trunk-staging-org
test-collection-id: z2dzjLHm
platform: x86_64-linux
artifact-pattern: ""
knapsack-pro-test-suite-token-rspec: ${{ secrets.KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC }}

- name: Test ruby gem uploads → analytics-cli-smoke-tests (prod)
uses: ./.github/actions/test_ruby_gem_uploads
with:
ruby-version: "3.4"
trunk-token: ${{ secrets.TRUNK_PROD_ORG_API_TOKEN }}
trunk-public-api-address: https://api.trunk.io
trunk-org-slug: trunk
test-collection-id: 4B2wfoEU
platform: x86_64-linux
artifact-pattern: ""
knapsack-pro-test-suite-token-rspec: ${{ secrets.KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC }}
Loading