-
Notifications
You must be signed in to change notification settings - Fork 510
46 lines (40 loc) · 1.24 KB
/
deploy-cf-unit.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
name: deploy-cloud-functions Unit
on:
push:
paths:
- 'deploy-cloud-functions/**'
- '.github/workflows/deploy-cf**'
pull_request:
paths:
- 'deploy-cloud-functions/**'
- '.github/workflows/deploy-cf**'
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-cloud-functions
- name: npm lint
run: npm run lint
working-directory: ./deploy-cloud-functions
- uses: google-github-actions/setup-gcloud@master
with:
service_account_email: ${{ secrets.DEPLOY_CF_SA_EMAIL }}
service_account_key: ${{ secrets.DEPLOY_CF_SA_KEY_B64 }}
export_default_credentials: true
- name: npm test
run: npm run test
working-directory: ./deploy-cloud-functions
env:
DEPLOY_CF_SA_KEY_JSON: ${{ secrets.DEPLOY_CF_SA_KEY_JSON }}
GCLOUD_PROJECT: ${{ secrets.DEPLOY_CF_PROJECT_ID }}
DEPLOY_CF_EVENT_PUBSUB_TOPIC: ${{ secrets.DEPLOY_CF_EVENT_PUBSUB_TOPIC }}