-
Notifications
You must be signed in to change notification settings - Fork 527
136 lines (114 loc) · 3.52 KB
/
integration.yml
File metadata and controls
136 lines (114 loc) · 3.52 KB
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
126
127
128
129
130
131
132
133
134
135
136
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 == 'workflow_dispatch' || 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@11bd71901bbe5b1630ceea73d27597364c9af683' # ratchet:actions/checkout@v4
- uses: 'actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020' # ratchet:actions/setup-node@v4
with:
node-version-file: 'package.json'
- name: 'Build'
run: 'npm ci && npm run build'
# No installation
- name: 'Skip install'
uses: './'
with:
skip_install: true
skip_tool_cache: true
# Constraint installation
- name: 'Install constraint'
uses: './'
with:
version: '>= 1.0.0'
skip_tool_cache: true
# Default installation
- name: 'Install version'
uses: './'
with:
version: '374.0.0'
skip_tool_cache: true
# Latest installation
- name: 'Install latest'
uses: './'
with:
version: 'latest'
skip_tool_cache: true
# 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'
skip_tool_cache: true
- 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 }}'
skip_tool_cache: true
- 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' # ratchet:exclude
with:
workload_identity_provider: '${{ vars.WIF_PROVIDER_NAME }}'
service_account: '${{ vars.SERVICE_ACCOUNT_EMAIL }}'
- name: 'Setup gcloud with WIF'
uses: './'
with:
skip_tool_cache: true
- 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' # ratchet:exclude
with:
credentials_json: '${{ secrets.SERVICE_ACCOUNT_KEY_JSON }}'
- name: 'Setup gcloud with SAKE'
uses: './'
with:
skip_tool_cache: true
- name: 'Check SAKE authentication'
run: 'npm run integration'
env:
TEST_ACCOUNT: '${{ vars.SERVICE_ACCOUNT_EMAIL }}'
TEST_PROJECT_ID: '${{ vars.PROJECT_ID }}'