Cfdeploy #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Integration Test | |
on: | |
push: | |
branches: | |
- develop | |
pull_request: | |
branches: | |
- develop | |
workflow_dispatch: | |
jobs: | |
integration-test: | |
runs-on: ubuntu-latest | |
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=${Cforg}-${Cfspace}-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 "$CauthUrl" --arg clientID "$csdmClientid" --arg clientSecret "$csdmClientsecret" --arg username "$cfUser" --arg password "$cfPassword" \ | |
'.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 | |
env: | |
Cforg: ${{ secrets.CF_ORG }} | |
Cfspace: ${{ secrets.CF_SPACE }} | |
CapsdmClientid: ${{ secrets.CAPSDM_CLIENT_ID }} | |
CapsdmClientsecret: ${{ secrets.CAPSDM_CLIENT_SECRET }} | |
CapauthUrl: ${{ secrets.CAPAUTH_URL }} | |
CfUser: ${{ secrets.CF_USER }} | |
CfPassword: ${{ secrets.CF_PASSWORD }} |