File tree Expand file tree Collapse file tree 1 file changed +22
-5
lines changed Expand file tree Collapse file tree 1 file changed +22
-5
lines changed Original file line number Diff line number Diff line change 1-
21name : Deploy Angular Blog to Cloud Run
32
43on :
76 - main # or any other branch you use for production
87
98jobs :
9+ test :
10+ name : Run Unit Tests
11+ runs-on : ubuntu-latest
12+ steps :
13+ - name : Checkout code
14+ uses : actions/checkout@v3
15+
16+ - name : Set up Node.js
17+ uses : actions/setup-node@v3
18+ with :
19+ node-version : ' 18'
20+
21+ - name : Install dependencies
22+ run : npm ci
23+
24+ - name : Run unit tests
25+ run : npm test
26+
1027 deploy :
1128 name : Build and Deploy
1229 runs-on : ubuntu-latest
13-
30+ needs : test
31+
1432 steps :
1533 - name : Checkout code
1634 uses : actions/checkout@v3
4260 - name : Deploy to Cloud Run using Buildpacks
4361 uses : google-github-actions/deploy-cloudrun@v2
4462 with :
45- service : angular-blog # your Cloud Run service name
46- region : europe-central2 # match to your region
63+ service : angular-blog
64+ region : europe-central2
4765 source : .
48-
You can’t perform that action at this time.
0 commit comments