|
1 | | -# Copyright © 2021 Cask Data, Inc. |
| 1 | +# Copyright © 2021-2023 Cask Data, Inc. |
2 | 2 | # Licensed under the Apache License, Version 2.0 (the "License"); you may not |
3 | 3 | # use this file except in compliance with the License. You may obtain a copy of |
4 | 4 | # the License at |
|
12 | 12 | # This workflow will build a Java project with Maven |
13 | 13 | # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven |
14 | 14 | # Note: Any changes to this workflow would be used only after merging into develop |
| 15 | + |
15 | 16 | name: Build e2e tests |
16 | 17 |
|
17 | 18 | on: |
|
40 | 41 | ) |
41 | 42 | strategy: |
42 | 43 | matrix: |
43 | | - tests: [bigquery, common, gcs, pubsub, spanner, gcscreate, gcsdelete, gcsmove, bigqueryexecute, gcscopy] |
| 44 | + tests: [bigquery, common, gcs, pubsub, spanner, gcscreate, gcsdelete, gcsmove, bigqueryexecute, |
| 45 | + bigquerymultitable] |
44 | 46 | fail-fast: false |
45 | 47 | steps: |
46 | 48 | # Pinned 1.0.0 version |
@@ -68,24 +70,52 @@ jobs: |
68 | 70 | key: ${{ runner.os }}-maven-${{ github.workflow }}-${{ hashFiles('**/pom.xml') }} |
69 | 71 | restore-keys: | |
70 | 72 | ${{ runner.os }}-maven-${{ github.workflow }} |
| 73 | + |
| 74 | + - name: Get Secrets from GCP Secret Manager |
| 75 | + id: secrets |
| 76 | + uses: 'google-github-actions/get-secretmanager-secrets@v0' |
| 77 | + with: |
| 78 | + secrets: |- |
| 79 | + MYSQL_HOST:cdapio-github-builds/MYSQL_HOST |
| 80 | + MYSQL_USERNAME:cdapio-github-builds/MYSQL_USERNAME |
| 81 | + MYSQL_PASSWORD:cdapio-github-builds/MYSQL_PASSWORD |
| 82 | + MYSQL_PORT:cdapio-github-builds/MYSQL_PORT |
| 83 | + BQMT_CONNECTION_STRING:cdapio-github-builds/CONNECTION_STRING |
| 84 | +
|
71 | 85 | - name: Run required e2e tests |
72 | 86 | if: github.event_name != 'workflow_dispatch' && github.event_name != 'push' && steps.filter.outputs.e2e-test == 'false' |
73 | 87 | run: python3 e2e/src/main/scripts/run_e2e_test.py --testRunner **/${{ matrix.tests }}/**/TestRunnerRequired.java |
| 88 | + env: |
| 89 | + MYSQL_HOST: ${{ steps.secrets.outputs.MYSQL_HOST }} |
| 90 | + MYSQL_USERNAME: ${{ steps.secrets.outputs.MYSQL_USERNAME }} |
| 91 | + MYSQL_PASSWORD: ${{ steps.secrets.outputs.MYSQL_PASSWORD }} |
| 92 | + MYSQL_PORT: ${{ steps.secrets.outputs.MYSQL_PORT }} |
| 93 | + BQMT_CONNECTION_STRING: ${{ steps.secrets.outputs.CONNECTION_STRING }} |
| 94 | + |
74 | 95 | - name: Run all e2e tests |
75 | 96 | if: github.event_name == 'workflow_dispatch' || github.event_name == 'push' || steps.filter.outputs.e2e-test == 'true' |
76 | 97 | run: python3 e2e/src/main/scripts/run_e2e_test.py --testRunner **/${{ matrix.tests }}/**/TestRunner.java |
| 98 | + env: |
| 99 | + MYSQL_HOST: ${{ steps.secrets.outputs.MYSQL_HOST }} |
| 100 | + MYSQL_USERNAME: ${{ steps.secrets.outputs.MYSQL_USERNAME }} |
| 101 | + MYSQL_PASSWORD: ${{ steps.secrets.outputs.MYSQL_PASSWORD }} |
| 102 | + MYSQL_PORT: ${{ steps.secrets.outputs.MYSQL_PORT }} |
| 103 | + BQMT_CONNECTION_STRING: ${{ steps.secrets.outputs.CONNECTION_STRING }} |
| 104 | + |
77 | 105 | - name: Upload report |
78 | 106 | uses: actions/upload-artifact@v3 |
79 | 107 | if: always() |
80 | 108 | with: |
81 | 109 | name: Cucumber report - ${{ matrix.tests }} |
82 | 110 | path: ./plugin/target/cucumber-reports |
| 111 | + |
83 | 112 | - name: Upload debug files |
84 | 113 | uses: actions/upload-artifact@v3 |
85 | 114 | if: always() |
86 | 115 | with: |
87 | 116 | name: Debug files - ${{ matrix.tests }} |
88 | 117 | path: ./**/target/e2e-debug |
| 118 | + |
89 | 119 | - name: Upload files to GCS |
90 | 120 | uses: google-github-actions/upload-cloud-storage@v0 |
91 | 121 | if: always() |
|
0 commit comments