mirror of
https://github.com/google-github-actions/setup-gcloud.git
synced 2026-08-21 13:09:24 +00:00
44 lines
1.2 KiB
YAML
44 lines
1.2 KiB
YAML
name: deploy-cloudrun Unit
|
|
|
|
on:
|
|
push:
|
|
paths:
|
|
- 'deploy-cloudrun/**'
|
|
pull_request:
|
|
paths:
|
|
- 'deploy-cloudrun/**'
|
|
|
|
jobs:
|
|
run:
|
|
name: test
|
|
runs-on: ${{ matrix.operating-system }}
|
|
strategy:
|
|
matrix:
|
|
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-node@master
|
|
with:
|
|
node-version: 12.x
|
|
|
|
- name: npm install
|
|
run: npm install
|
|
working-directory: ./deploy-cloudrun
|
|
|
|
- name: npm lint
|
|
run: npm run lint
|
|
working-directory: ./deploy-cloudrun
|
|
|
|
- uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
|
|
with:
|
|
service_account_email: ${{ secrets.DEPLOY_CLOUDRUN_SA_EMAIL }}
|
|
service_account_key: ${{ secrets.DEPLOY_CLOUDRUN_SA_KEY_B64 }}
|
|
export_default_credentials: true
|
|
- name: npm test
|
|
run: npm run test
|
|
working-directory: ./deploy-cloudrun
|
|
env:
|
|
TEST_DEPLOY_CLOUDRUN_CREDENTIALS: ${{ secrets.DEPLOY_CLOUDRUN_SA_KEY_B64 }}
|
|
TEST_DEPLOY_CLOUDRUN_PROJECT: ${{ secrets.DEPLOY_CLOUDRUN_PROJECT_ID }}
|
|
GCLOUD_PROJECT: ${{ secrets.DEPLOY_CLOUDRUN_PROJECT_ID }}
|