|
1 | | -name: 'integration' |
| 1 | +name: 'Integration' |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | push: |
|
7 | 7 | pull_request: |
8 | 8 | branches: |
9 | 9 | - 'main' |
| 10 | + workflow_dispatch: |
10 | 11 |
|
11 | 12 | concurrency: |
12 | 13 | group: '${{ github.workflow }}-${{ github.head_ref || github.ref }}' |
13 | 14 | cancel-in-progress: true |
14 | 15 |
|
15 | 16 | jobs: |
16 | | - auth_json: |
17 | | - if: ${{ github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name && github.actor != 'dependabot[bot]' }} |
18 | | - runs-on: 'ubuntu-latest' |
19 | | - steps: |
20 | | - - uses: 'actions/checkout@v3' |
21 | | - |
22 | | - - uses: 'actions/setup-node@v3' |
23 | | - with: |
24 | | - node-version: '16.x' |
25 | | - |
26 | | - - name: 'npm build' |
27 | | - run: 'npm ci && npm run build' |
28 | | - |
29 | | - - uses: 'google-github-actions/auth@main' |
30 | | - with: |
31 | | - credentials_json: '${{ secrets.DEPLOY_CF_SA_KEY_JSON }}' |
32 | | - |
33 | | - - id: 'deploy' |
34 | | - uses: './' |
35 | | - with: |
36 | | - name: 'auth-json-http-${{ github.run_number }}' |
37 | | - runtime: 'nodejs10' |
38 | | - entry_point: 'helloWorld' |
39 | | - source_dir: './tests/test-node-func/' |
40 | | - |
41 | | - # Auth as the main account for integration and cleanup |
42 | | - - uses: 'google-github-actions/auth@main' |
43 | | - with: |
44 | | - credentials_json: '${{ secrets.DEPLOY_CF_SA_KEY_JSON }}' |
45 | | - |
46 | | - - name: 'integration' |
47 | | - env: |
48 | | - URL: '${{ steps.deploy.outputs.url }}' |
49 | | - run: 'npm run e2e-tests' |
50 | | - |
51 | | - - name: 'cleanup' |
52 | | - if: ${{ always() }} |
53 | | - env: |
54 | | - CLEANUP_FUNCTION_NAME: '${{ steps.deploy.outputs.id }}' |
55 | | - run: 'npm run cleanup' |
56 | | - |
57 | | - |
58 | | - auth_workload_identity_federation: |
59 | | - if: ${{ github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name && github.actor != 'dependabot[bot]' }} |
60 | | - name: 'auth_workload_identity_federation' |
61 | | - permissions: |
62 | | - contents: 'read' |
63 | | - id-token: 'write' |
64 | | - runs-on: 'ubuntu-latest' |
65 | | - steps: |
66 | | - - uses: 'actions/checkout@v3' |
67 | | - |
68 | | - - uses: 'actions/setup-node@v3' |
69 | | - with: |
70 | | - node-version: '16.x' |
71 | | - |
72 | | - - name: 'npm build' |
73 | | - run: 'npm ci && npm run build' |
74 | | - |
75 | | - - uses: 'google-github-actions/auth@main' |
76 | | - with: |
77 | | - workload_identity_provider: '${{ secrets.WIF_PROVIDER_NAME }}' |
78 | | - service_account: '${{ secrets.DEPLOY_CF_SA_EMAIL }}' |
79 | | - |
80 | | - - id: 'deploy' |
81 | | - uses: './' |
82 | | - with: |
83 | | - name: 'auth-wif-http-${{ github.run_number }}' |
84 | | - runtime: 'nodejs10' |
85 | | - entry_point: 'helloWorld' |
86 | | - source_dir: './tests/test-node-func/' |
87 | | - |
88 | | - # Auth as the main account for integration and cleanup |
89 | | - - uses: 'google-github-actions/auth@main' |
90 | | - with: |
91 | | - credentials_json: '${{ secrets.DEPLOY_CF_SA_KEY_JSON }}' |
92 | | - |
93 | | - - name: 'integration' |
94 | | - env: |
95 | | - URL: '${{ steps.deploy.outputs.url }}' |
96 | | - run: 'npm run e2e-tests' |
97 | | - |
98 | | - - name: 'cleanup' |
99 | | - if: ${{ always() }} |
100 | | - env: |
101 | | - CLEANUP_FUNCTION_NAME: '${{ steps.deploy.outputs.id }}' |
102 | | - run: 'npm run cleanup' |
103 | | - |
104 | | - # Deprecated |
105 | | - auth_setup_gcloud: |
106 | | - if: ${{ github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name && github.actor != 'dependabot[bot]' }} |
107 | | - name: 'auth_setup_gcloud' |
108 | | - runs-on: 'ubuntu-latest' |
109 | | - steps: |
110 | | - - uses: 'actions/checkout@v3' |
111 | | - |
112 | | - - uses: 'actions/setup-node@v3' |
113 | | - with: |
114 | | - node-version: '16.x' |
115 | | - |
116 | | - - name: 'npm build' |
117 | | - run: 'npm ci && npm run build' |
118 | | - |
119 | | - - uses: 'google-github-actions/setup-gcloud@main' |
120 | | - with: |
121 | | - service_account_email: '${{ secrets.DEPLOY_CF_SA_EMAIL }}' |
122 | | - service_account_key: '${{ secrets.DEPLOY_CF_SA_KEY_JSON }}' |
123 | | - export_default_credentials: true |
124 | | - |
125 | | - - id: 'deploy' |
126 | | - uses: ./ |
127 | | - with: |
128 | | - name: 'auth-setup-gcloud-${{ github.run_number }}' |
129 | | - runtime: 'nodejs10' |
130 | | - entry_point: 'helloWorld' |
131 | | - source_dir: './tests/test-node-func/' |
132 | | - |
133 | | - # Auth as the main account for integration and cleanup |
134 | | - - uses: 'google-github-actions/auth@main' |
135 | | - with: |
136 | | - credentials_json: '${{ secrets.DEPLOY_CF_SA_KEY_JSON }}' |
137 | | - |
138 | | - - name: 'integration' |
139 | | - env: |
140 | | - URL: '${{ steps.deploy.outputs.url }}' |
141 | | - run: 'npm run e2e-tests' |
142 | | - |
143 | | - - name: 'cleanup' |
144 | | - if: ${{ always() }} |
145 | | - env: |
146 | | - CLEANUP_FUNCTION_NAME: '${{ steps.deploy.outputs.id }}' |
147 | | - run: 'npm run cleanup' |
148 | | - |
149 | | - # Deprecated |
150 | | - auth_builtin_credentials: |
151 | | - if: ${{ github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name && github.actor != 'dependabot[bot]' }} |
152 | | - name: 'auth_builtin_credentials' |
153 | | - runs-on: 'ubuntu-latest' |
154 | | - steps: |
155 | | - - uses: 'actions/checkout@v3' |
156 | | - |
157 | | - - uses: 'actions/setup-node@v3' |
158 | | - with: |
159 | | - node-version: '16.x' |
160 | | - |
161 | | - - name: 'npm build' |
162 | | - run: 'npm ci && npm run build' |
163 | | - |
164 | | - - id: 'deploy' |
165 | | - uses: './' |
166 | | - with: |
167 | | - credentials: '${{ secrets.DEPLOY_CF_SA_KEY_JSON }}' |
168 | | - name: 'auth-builtin-${{ github.run_number }}' |
169 | | - region: 'us-east1' |
170 | | - runtime: 'nodejs10' |
171 | | - entry_point: 'helloWorld' |
172 | | - memory_mb: 512 |
173 | | - source_dir: './tests/test-node-func/' |
174 | | - |
175 | | - # Auth as the main account for integration and cleanup |
176 | | - - uses: 'google-github-actions/auth@main' |
177 | | - with: |
178 | | - credentials_json: '${{ secrets.DEPLOY_CF_SA_KEY_JSON }}' |
179 | | - |
180 | | - - name: 'integration' |
181 | | - env: |
182 | | - URL: '${{ steps.deploy.outputs.url }}' |
183 | | - run: 'npm run e2e-tests' |
184 | | - |
185 | | - - name: 'cleanup' |
186 | | - if: ${{ always() }} |
187 | | - env: |
188 | | - CLEANUP_FUNCTION_NAME: '${{ steps.deploy.outputs.id }}' |
189 | | - run: 'npm run cleanup' |
190 | | - |
191 | 17 | https_trigger: |
192 | 18 | if: ${{ github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name && github.actor != 'dependabot[bot]' }} |
193 | | - name: 'https_trigger' |
194 | 19 | permissions: |
195 | 20 | contents: 'read' |
196 | 21 | id-token: 'write' |
@@ -219,11 +44,6 @@ jobs: |
219 | 44 | source_dir: './tests/test-node-func/' |
220 | 45 | https_trigger_security_level: 'secure_always' |
221 | 46 |
|
222 | | - # Auth as the main account for integration and cleanup |
223 | | - - uses: 'google-github-actions/auth@main' |
224 | | - with: |
225 | | - credentials_json: '${{ secrets.DEPLOY_CF_SA_KEY_JSON }}' |
226 | | - |
227 | 47 | - name: 'cleanup' |
228 | 48 | if: ${{ always() }} |
229 | 49 | env: |
|
232 | 52 |
|
233 | 53 | event_trigger: |
234 | 54 | if: ${{ github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name && github.actor != 'dependabot[bot]' }} |
235 | | - name: 'event_trigger' |
236 | 55 | permissions: |
237 | 56 | contents: 'read' |
238 | 57 | id-token: 'write' |
@@ -273,11 +92,6 @@ jobs: |
273 | 92 | max_instances: 5 |
274 | 93 | timeout: 300 |
275 | 94 |
|
276 | | - # Auth as the main account for integration and cleanup |
277 | | - - uses: 'google-github-actions/auth@main' |
278 | | - with: |
279 | | - credentials_json: '${{ secrets.DEPLOY_CF_SA_KEY_JSON }}' |
280 | | - |
281 | 95 | - name: 'cleanup' |
282 | 96 | if: ${{ always() }} |
283 | 97 | env: |
|
0 commit comments