setup-gcloud/.github/workflows/setup-gcloud-it.yml
2021-09-15 14:29:44 -07:00

158 lines
4.6 KiB
YAML

name: setup-gcloud Integration
on:
push:
branches:
- 'master'
pull_request:
jobs:
versioned:
if: ${{ github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name && github.actor != 'dependabot[bot]' }}
name: setup-gcloud versioned
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v2
- name: Build dependency
working-directory: setupGcloudSDK
run: |-
npm install
npm run build
- id: build
name: Build dist
run: |-
npm install
npm run build
- name: setup-gcloud
uses: ./
with:
version: '290.0.1'
service_account_key: ${{ secrets.SETUP_GCLOUD_IT_KEY }}
- name: Integration Tests
shell: bash
run: ./tests/integration-tests.sh
latest:
if: ${{ github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name && github.actor != 'dependabot[bot]' }}
name: setup-gcloud latest
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v2
- name: Build dependency
run: |-
npm install
npm run build
- id: build
name: Build dist
run: |-
npm install
npm run build
- name: setup-gcloud
uses: ./
with:
version: 'latest'
service_account_key: ${{ secrets.SETUP_GCLOUD_IT_KEY }}
- name: Integration Tests
shell: bash
run: ./tests/integration-tests.sh
email:
if: ${{ github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name && github.actor != 'dependabot[bot]' }}
name: setup-gcloud user-defined email
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v2
- name: Build dependency
working-directory: setupGcloudSDK
run: |-
npm install
npm run build
- id: build
name: Build dist
run: |-
npm install
npm run build
- name: setup-gcloud
uses: ./
with:
version: 'latest'
service_account_email: ${{ secrets.SETUP_GCLOUD_IT_EMAIL }}
service_account_key: ${{ secrets.SETUP_GCLOUD_IT_KEY }}
- name: Integration Tests
shell: bash
run: ./tests/integration-tests.sh
exported:
if: ${{ github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name && github.actor != 'dependabot[bot]' }}
name: setup-gcloud exported credentials
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v2
- name: Build dependency
working-directory: setupGcloudSDK
run: |-
npm install
npm run build
- id: build
name: Build dist
run: |-
npm install
npm run build
- name: setup-gcloud
uses: ./
with:
version: 'latest'
service_account_key: ${{ secrets.SETUP_GCLOUD_IT_KEY }}
export_default_credentials: true
- name: Verify Exported
shell: bash
run: test -f $GOOGLE_APPLICATION_CREDENTIALS
project_id:
if: ${{ github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name && github.actor != 'dependabot[bot]' }}
name: setup-gcloud with configured project
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v2
- name: Build dependency
working-directory: setupGcloudSDK
run: |-
npm install
npm run build
- id: build
name: Build dist
run: |-
npm install
npm run build
- name: setup-gcloud
uses: ./
with:
project_id: ${{ secrets.SETUP_GCLOUD_IT_PROJECT_ID }}
- name: Verify project
shell: bash
run: gcloud config get-value project | grep ${{ secrets.SETUP_GCLOUD_IT_PROJECT_ID }}