Skip to content

Commit

Permalink
Clean up Typescript Tests workflow (#33458)
Browse files Browse the repository at this point in the history
* Remove reference to static GCP credentials

* Conditionally run xlang tests

* Make Dataflow tests conditional
  • Loading branch information
damondouglas authored Dec 28, 2024
1 parent 5944a30 commit def0678
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions .github/workflows/typescript_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ name: TypeScript Tests

on:
workflow_dispatch:
inputs:
runXlang:
description: 'Type "true" if you want to run xlang tests'
default: false
runDataflow:
description: 'Type "true" if you want to run Dataflow tests'
default: false
schedule:
- cron: '10 2 * * *'
push:
Expand Down Expand Up @@ -68,6 +75,8 @@ jobs:
# if: ${{ matrix.os != 'ubuntu-latest' }}
typescript_xlang_tests:
name: 'TypeScript xlang Tests'
# TODO(https://github.com/apache/beam/issues/33346): remove manual trigger after fixing referenced issue.
if: (github.event_name == 'workflow_dispatch' && github.event.inputs.runXlang == 'true')
runs-on: [self-hosted, ubuntu-20.04]
timeout-minutes: 15
strategy:
Expand Down Expand Up @@ -115,16 +124,16 @@ jobs:
GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
GCP_REGION: ${{ secrets.GCP_REGION }}
GCP_SA_EMAIL: ${{ secrets.GCP_SA_EMAIL }}
GCP_SA_KEY: ${{ secrets.GCP_SA_KEY }}
GCP_TESTING_BUCKET: ${{ secrets.GCP_TESTING_BUCKET }}
GCP_PYTHON_WHEELS_BUCKET: "not-needed-here"

typescript_dataflow_tests:
name: 'TypeScript Dataflow Tests'
# TODO(https://github.com/apache/beam/issues/33346): remove manual trigger after fixing referenced issue.
if: (github.event_name == 'workflow_dispatch' && github.event.inputs.runDataflow == 'true')
runs-on: ubuntu-latest
needs:
- check_gcp_variables
if: needs.check_gcp_variables.outputs.gcp-variables-set == 'true'
strategy:
fail-fast: false
steps:
Expand All @@ -146,11 +155,6 @@ jobs:
run: |
pip install 'pandas>=1.0,<1.5'
pip install -e ".[gcp]"
- name: Authenticate on GCP
uses: google-github-actions/auth@v1
with:
credentials_json: ${{ secrets.GCP_SA_KEY }}
project_id: ${{ secrets.GCP_PROJECT_ID }}
- run: npm ci
working-directory: ./sdks/typescript
- run: npm run build
Expand Down

0 comments on commit def0678

Please sign in to comment.