-
Notifications
You must be signed in to change notification settings - Fork 3
88 lines (67 loc) · 2.1 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# This will run unit / integration and e2e tests
name: Test
on:
pull_request:
types: [opened, edited, synchronize]
workflow_dispatch:
jobs:
# This will start unit/integration testing
# test-unit:
# name: Unit
# strategy:
# matrix:
# version: [20, 18]
# platform: [ubuntu-latest]
# runs-on: ${{ matrix.platform }}
# steps:
# - name: Get code
# uses: actions/checkout@v4
# - name: Install dependencies
# run: npm install
# - name: Instal SAP CDS-DK
# run: npm i -g @sap/cds-dk ts-node
# - name: Start unit / integration tests
# run: npm run test:unit
# This will start the e2e tests with a live server
test-e2e:
name: End-to-end (e2e)
# needs: test-unit
strategy:
matrix:
version: [20, 18]
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Get code
uses: actions/checkout@v4
- name: Install dependencies
run: |
npm install -g @sap/cds-dk ts-node typescript
npm install
- name: Build project
run: npm run build
- name: Start server and start e2e tests
run: npm run test:e2e
# This decorator is a special decorator which needs an extensive testing due to creation of:
# - @dispatcher folder
# - injection of @dispatcher folder inside of the package.json - imports
# - injection of @dispatcher folder inside of the tsconfig.json - include
# - injection of @dispatcher folder inside of the .gitignore
test-env-decorator:
name: Test @Env decorator
strategy:
matrix:
version: [20, 18]
platform: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Get code
uses: actions/checkout@v4
- name: Install dependencies
run: |
npm install -g @sap/cds-dk ts-node typescript
npm install
- name: Build project
run: npm run build
- name: Verify @decorator folder, index.ts file, and content
run: ts-node ./test/postinstall/Verifier.ts