-
Notifications
You must be signed in to change notification settings - Fork 509
125 lines (103 loc) · 3.01 KB
/
integration.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
name: 'Integration'
on:
push:
branches:
- 'main'
- 'release/**/*'
pull_request:
branches:
- 'main'
- 'release/**/*'
workflow_dispatch:
concurrency:
group: '${{ github.workflow }}-${{ github.head_ref || github.ref }}'
cancel-in-progress: true
jobs:
integration:
if: ${{ github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name && github.actor != 'dependabot[bot]' }}
strategy:
fail-fast: false
matrix:
os:
- 'ubuntu-latest'
- 'windows-latest'
- 'macos-latest'
runs-on: '${{ matrix.os }}'
permissions:
id-token: 'write'
steps:
- uses: 'actions/checkout@v4'
- uses: 'actions/setup-node@v4'
with:
node-version: '20.x'
- name: 'Build'
run: 'npm ci && npm run build'
# No installation
- name: 'Skip install'
uses: './'
with:
skip_install: true
# Constraint installation
- name: 'Install constraint'
uses: './'
with:
version: '>= 1.0.0'
# Default installation
- name: 'Install version'
uses: './'
with:
version: '374.0.0'
# Latest installation
- name: 'Install latest'
uses: './'
with:
version: 'latest'
# By default, there is no configuration
- name: 'Check defaults'
run: 'npm run integration'
env:
TEST_ACCOUNT: '(unset)'
TEST_PROJECT_ID: '(unset)'
# Install components
- name: 'Install components'
uses: './'
with:
install_components: 'cloud-run-proxy'
- name: 'Check components'
run: 'npm run integration'
env:
TEST_COMPONENTS: 'cloud-run-proxy'
# Set a project ID
- name: 'Set project ID'
uses: './'
with:
project_id: '${{ vars.PROJECT_ID }}'
- name: 'Check project ID'
run: 'npm run integration'
env:
TEST_PROJECT_ID: '${{ vars.PROJECT_ID }}'
# Authenticate via WIF
- name: 'Authenticate via WIF'
uses: 'google-github-actions/auth@v2'
with:
workload_identity_provider: '${{ vars.WIF_PROVIDER_NAME }}'
service_account: '${{ vars.SERVICE_ACCOUNT_EMAIL }}'
- name: 'Setup gcloud with WIF'
uses: './'
- name: 'Check WIF authentication'
run: 'npm run integration'
env:
TEST_ACCOUNT: '${{ vars.SERVICE_ACCOUNT_EMAIL }}'
TEST_PROJECT_ID: '${{ vars.PROJECT_ID }}'
# Authenticate via SAKE
- name: 'Authenticate via SAKE'
uses: 'google-github-actions/auth@v2'
with:
credentials_json: '${{ secrets.SERVICE_ACCOUNT_KEY_JSON }}'
- name: 'Setup gcloud with SAKE'
uses: './'
- name: 'Check SAKE authentication'
run: 'npm run integration'
env:
TEST_ACCOUNT: '${{ vars.SERVICE_ACCOUNT_EMAIL }}'
TEST_PROJECT_ID: '${{ vars.PROJECT_ID }}'