-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (51 loc) · 1.5 KB
/
tests.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
name: tests
on:
pull_request:
branches:
- main
push:
branches:
- main
workflow_dispatch:
env:
COSMOS_DB_NAME: test
COSMOS_ENDPOINT: https://localhost:8081
COSMOS_KEY: C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw== # well-known key for Cosmos DB emulator
LOGGING: TRUE
MS_AUTH_COOKIE: AppServiceAuthSession
MS_AUTH_HEADER: X-MS-CLIENT-PRINCIPAL-NAME
MS_AUTH_USER: [email protected]
NODE_ENV: CI
NODE_TLS_REJECT_UNAUTHORIZED: 0
PORT: 3001
jobs:
run-tests:
name: run tests
runs-on: windows-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: downgrade to Cosmos DB Emulator v2.14.9
run: |
./.github/workflows/downgrade.ps1
shell: pwsh
- name: set up Node
uses: actions/setup-node@v3
with:
node-version: 18
- name: cache Node.js modules
id: cache
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ hashFiles('**/package-lock.json') }}
- name: install dependencies
run: npm ci
- name: run stop-only test
run: npm run stop-only
- name: build app
run: npm run build
- name: start database
run: npm run start-db
- name: run tests
run: npm test