-
Notifications
You must be signed in to change notification settings - Fork 7
132 lines (113 loc) · 3.49 KB
/
main.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
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
name: CrisisCleanup
on:
workflow_dispatch:
create:
release:
types: [published]
pull_request:
paths:
- '*.json'
- 'yarn.lock'
- '**/**.js'
- '**/**.vue'
- '**/**.js.snap'
- '.github/workflows/*'
push:
branches:
- master
- develop
tags:
- 'v**'
paths:
- '*.json'
- 'yarn.lock'
- '**/**.js'
- '**/**.vue'
- '**/**.js.snap'
- '.github/workflows/*'
- 'vue.config.js'
env:
VUE_APP_WHAT_3_WORDS_API_KEY: ${{ secrets.VUE_APP_WHAT_3_WORDS_API_KEY }}
VUE_APP_GOOGLE_MAPS_API_KEY: ${{ secrets.VUE_APP_GOOGLE_MAPS_API_KEY }}
VUE_APP_PITNEYBOWES_API_KEY: ${{ secrets.VUE_APP_PITNEYBOWES_API_KEY }}
VUE_APP_PITNEYBOWES_BASIC_AUTH_TOKEN: ${{ secrets.VUE_APP_PITNEYBOWES_BASIC_AUTH_TOKEN }}
VUE_APP_PHONE_DEFAULT_USERNAME: 'english'
VUE_APP_PHONE_DEFAULT_PASSWORD: 'volunteer'
VUE_APP_ENGLISH_PHONE_GATEWAY: '216961'
VUE_APP_SPANISH_PHONE_GATEWAY: '216962'
VUE_APP_DEFAULT_CALLER_ID: '2722003211'
VUE_APP_API_BASE_URL: 'https://api.dev.crisiscleanup.io'
VUE_APP_BASE_URL: 'https://app.dev.crisiscleanup.io'
VUE_APP_WS_URL: 'wss://socket.dev.crisiscleanup.io'
VUE_APP_PORTAL_KEY: 'crisiscleanup_demo'
VUE_APP_AWS_CCP_REGION: 'us-east-1'
VUE_APP_CCP_PRINCIPAL: 'arn:aws:iam::240937704012:saml-provider/ccudev'
VUE_APP_CCP_ROLE: 'arn:aws:iam::240937704012:role/CCUDevConnectRole'
VUE_APP_CCP_INSTANCE: 87fbcad4-9f58-4153-84e8-d5b7202693e8
VUE_APP_AWS_CCP_URL: https://ccudev.awsapps.com/connect/ccp-v2/
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_PROPERTIES: sentry.properties
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
CI: 1
CYPRESS_INSTALL_BINARY: 0
jobs:
test:
name: Run Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '14'
cache: 'yarn'
- name: Install Dependencies
run: yarn install
- name: Run Tests
run: yarn test:unit
- name: Upload Coverage
uses: coverallsapp/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
lint:
name: Run Linter
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '14'
cache: 'yarn'
- name: Install Dependencies
run: yarn install
- name: Run Linter
run: yarn lint
deploy:
name: Deploy Site
runs-on: ubuntu-latest
needs: [test, lint]
if: "github.event_name != 'pull_request'"
steps:
- uses: actions/checkout@v2
- name: Invoke Development Deploy
if: "github.event_name != 'pull_request' && github.ref == 'refs/heads/develop'"
uses: benc-uk/workflow-dispatch@v1
with:
workflow: Deploy
token: ${{ secrets.GHCR_PAT }}
inputs: '{ "stage": "development" }'
- name: Invoke Staging Deploy
if: "github.event_name == 'create' && github.event.ref_type == 'tag'"
uses: benc-uk/workflow-dispatch@v1
with:
workflow: Deploy
token: ${{ secrets.GHCR_PAT }}
inputs: '{ "stage": "staging" }'
- name: Invoke Production Deploy
if: "github.event_name == 'release'"
uses: benc-uk/workflow-dispatch@v1
with:
workflow: Deploy
token: ${{ secrets.GHCR_PAT }}
inputs: '{ "stage": "production" }'