-
Notifications
You must be signed in to change notification settings - Fork 3
56 lines (54 loc) · 1.6 KB
/
test.yml
File metadata and controls
56 lines (54 loc) · 1.6 KB
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
name: CI
on:
workflow_dispatch:
push:
branches: [main]
pull_request_target:
branches: [main]
types: [reopened, synchronize, opened]
jobs:
requires-approval:
runs-on: ubuntu-latest
name: "Waiting for PR approval as this workflow runs on pull_request_target"
if: github.event_name == 'pull_request_target' && github.event.pull_request.base.user.login != 'cap-js'
environment: pr-approval
steps:
- name: Approval Step
run: echo "This job has been approved!"
test:
runs-on: ubuntu-latest
timeout-minutes: 3
strategy:
fail-fast: false
matrix:
node-version: [20.x, 22.x]
cds-version: [latest]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- run: npm i -g @sap/cds-dk@${{ matrix.cds-version }}
- run: npm i
- run: cd test/bookshop && npm i
- run: npm run test
integration-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [20.x, 22.x]
cds-version: [latest]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Integration tests
uses: ./.github/actions/integration-tests
with:
CF_API: ${{ secrets.CF_API }}
CF_USERNAME: ${{ secrets.CF_USERNAME }}
CF_PASSWORD: ${{ secrets.CF_PASSWORD }}
CF_ORG: ${{ secrets.CF_ORG }}
CF_SPACE: ${{ secrets.CF_SPACE }}
NODE_VERSION: ${{ matrix.node-version }}