-
Notifications
You must be signed in to change notification settings - Fork 1
92 lines (73 loc) · 2.47 KB
/
e2e-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
89
90
91
92
name: Salesforce oms e2e test
on:
pull_request:
branches:
- '**'
paths:
- 'force-app/main/default/**'
- 'e2e/**'
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
env:
OMS_E2E_AUTH_URL: ${{ secrets.OMS_E2E_AUTH_URL }}
steps:
- name: Checkout This Repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install Salesforce CLI
run: npm install @salesforce/cli --global
- name: Create authentication file from secret
run: echo ${OMS_E2E_AUTH_URL} > secret.json
- name: Authenticate to E2E org
run: sf org login sfdx-url -f secret.json --set-default --alias e2eOrg
- name: Checkout Apex-Library Repository
uses: actions/checkout@v4
with:
repository: Adyen/adyen-apex-api-library
ref: develop
path: dependency-repo
- name: Push Apex Lib Source to the Org
run: |
cd dependency-repo
sf project deploy start --target-org e2eOrg
- name: Checkout This Repository Back
uses: actions/checkout@v4
- name: Install xmlstarlet
run: sudo apt-get install -y xmlstarlet
- name: Update customMetadata XML
run: |
chmod +x ./scripts/updateCustomMetadata.sh
./scripts/updateCustomMetadata.sh
env:
MERCHANT_ACCOUNT: ${{ secrets.OMS_E2E_MERCHANT_ACCOUNT }}
HMAC_KEY: ${{ secrets.OMS_E2E_HMAC_KEY }}
- name: Deploy This Repository Code
run: sf project deploy start --target-org e2eOrg --ignore-conflicts
e2e-testing:
runs-on: ubuntu-latest
needs: build-and-deploy
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install dependencies
working-directory: ./e2e
run: npm ci
- name: Run e2e tests
working-directory: ./e2e
run: npm run test
env:
SALESFORCE_USERNAME: ${{ secrets.SALESFORCE_USERNAME }}
SALESFORCE_PASSWORD: ${{ secrets.SALESFORCE_PASSWORD }}
SFCC_HOSTNAME: ${{ secrets.SFCC_HOSTNAME }}
SFCC_STOREFRONT_USERNAME: ${{ secrets.SFCC_STOREFRONT_USERNAME }}
SFCC_STOREFRONT_PASSWORD: ${{ secrets.SFCC_STOREFRONT_PASSWORD }}
MAX_POLL_ATTEMPTS: ${{ vars.MAX_POLL_ATTEMPTS }}