fix: update release workflows (#698) #125
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }}' |