-
Notifications
You must be signed in to change notification settings - Fork 3
37 lines (32 loc) · 1.33 KB
/
integration_test.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
name: Integration Test
on:
workflow_run:
workflows: ['Deploy to Cloud Foundry']
types: [completed]
branches:
- 'cfdeploy'
workflow_dispatch:
jobs:
integration-test:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Node.js environment
uses: actions/[email protected]
with:
node-version: '20'
- name: Run integration tests
run: |
appUrl=${{ secrets.CF_ORG }}-${{ secrets.CF_SPACE }}-incidents-srv.cfapps.eu12.hana.ondemand.com
echo "app url: ${appUrl}"
# JSON file path
JSON_FILE="test/integration/credentials.json"
# Modify JSON file
jq --arg appUrl "$appUrl" --arg authUrl "${{ secrets.CAPAUTH_URL }}" --arg clientID "${{ secrets.CAPSDM_CLIENT_ID }}" --arg clientSecret "${{ secrets.CAPSDM_CLIENT_SECRET }}" --arg username "${{ secrets.CF_USER }}" --arg password "${{ secrets.CF_PASSWORD }}" \
'.appUrl = $appUrl | .authUrl = $authUrl | .clientID = $clientID | .clientSecret = $clientSecret | .username = $username | .password = $password' $JSON_FILE > "temp.json" \
&& mv "temp.json" $JSON_FILE
cat $JSON_FILE
npm i
npm run integration-test