Skip to content

Commit

Permalink
Update workflow to use inputs to local action
Browse files Browse the repository at this point in the history
  • Loading branch information
sjonpaulbrown committed Jun 24, 2024
1 parent 94b9bbe commit a6344e0
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 11 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/actions/test-monitor-process-results/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@ name: Test Monitor - Process Results

description: Custom action that's used in multiple Flaky Test Monitor jobs to process test results and upload them to BigQuery

inputs:
service_account:
description: 'The GCP Service Account'
required: true
workload_identity_provider:
description: 'The GCP Workload Identity Provider'
required: true

runs:
using : "composite"
steps:
Expand All @@ -23,9 +31,9 @@ runs:
id: auth
uses: google-github-actions/auth@v2
with:
service_account: ${{ inputs.service_account }}
token_format: 'access_token'
workload_identity_provider: ${{ secrets.FLAKY_TEST_WORKLOAD_IDENTITY_PROVIDER }}
service_account: ${{ secrets.FLAKY_TEST_SERVICE_ACCOUNT }}
workload_identity_provider: ${{ inputs.workload_identity_provider }}
- name: Upload results to BigQuery (skipped tests)
uses: nick-fields/retry@v2
with:
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/flaky-test-monitor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ jobs:
env:
TEST_CATEGORY: unit
uses: ./.github/workflows/actions/test-monitor-process-results
secrets:
FLAKY_TEST_WORKLOAD_IDENTITY_PROVIDER: ${{ secrets.FLAKY_TEST_WORKLOAD_IDENTITY_PROVIDER }}
FLAKY_TEST_SERVICE_ACCOUNT: ${{ secrets.FLAKY_TEST_SERVICE_ACCOUNT }}
with:
service_account: ${{ secrets.FLAKY_TEST_SERVICE_ACCOUNT }}
workload_identity_provider: ${{ secrets.FLAKY_TEST_WORKLOAD_IDENTITY_PROVIDER }}

unit-test-modules:
name: Unit Tests (Modules)
Expand Down Expand Up @@ -117,9 +117,9 @@ jobs:
env:
TEST_CATEGORY: ${{ matrix.test_category }}
uses: ./.github/workflows/actions/test-monitor-process-results
secrets:
FLAKY_TEST_WORKLOAD_IDENTITY_PROVIDER: ${{ secrets.FLAKY_TEST_WORKLOAD_IDENTITY_PROVIDER }}
FLAKY_TEST_SERVICE_ACCOUNT: ${{ secrets.FLAKY_TEST_SERVICE_ACCOUNT }}
with:
service_account: ${{ secrets.FLAKY_TEST_SERVICE_ACCOUNT }}
workload_identity_provider: ${{ secrets.FLAKY_TEST_WORKLOAD_IDENTITY_PROVIDER }}

integration-test:
name: Integration Tests
Expand Down Expand Up @@ -178,7 +178,7 @@ jobs:
env:
TEST_CATEGORY: ${{ matrix.test_category }}
uses: ./.github/workflows/actions/test-monitor-process-results
secrets:
FLAKY_TEST_WORKLOAD_IDENTITY_PROVIDER: ${{ secrets.FLAKY_TEST_WORKLOAD_IDENTITY_PROVIDER }}
FLAKY_TEST_SERVICE_ACCOUNT: ${{ secrets.FLAKY_TEST_SERVICE_ACCOUNT }}
with:
service_account: ${{ secrets.FLAKY_TEST_SERVICE_ACCOUNT }}
workload_identity_provider: ${{ secrets.FLAKY_TEST_WORKLOAD_IDENTITY_PROVIDER }}

0 comments on commit a6344e0

Please sign in to comment.