-
Notifications
You must be signed in to change notification settings - Fork 5
66 lines (63 loc) · 2.09 KB
/
webhooks_pr_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
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
name: Webhooks CI
on: [workflow_dispatch]
jobs:
test:
name: Test PR
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: ['20']
os: [macOS-latest, ubuntu-latest, windows-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Prepare Context (Linux/macOS)
if: runner.os != 'Windows'
run: mv -f webhooks/add-to-cart-stock-validation/* .
- name: Prepare Context (Windows)
if: runner.os == 'Windows'
run: |
$source = "webhooks\add-to-cart-stock-validation\*"
$destination = "."
$files = Get-ChildItem -Path $source
foreach ($file in $files) {
$destPath = Join-Path -Path $destination -ChildPath $file.Name
if (Test-Path -Path $destPath) {
Remove-Item -Path $destPath -Recurse -Force
}
}
Move-Item -Path $source -Destination $destination -Force
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: npm install
run: npm i
- name: Setup CLI
uses: adobe/aio-cli-setup-action@1.3.0
with:
os: ${{ matrix.os }}
version: 10.x.x
- name: Auth
uses: adobe/aio-apps-action@3.3.0
with:
os: ${{ matrix.os }}
command: oauth_sts
CLIENTID: ${{ secrets.CLIENTID_STAGE }}
CLIENTSECRET: ${{ secrets.CLIENTSECRET_STAGE }}
TECHNICALACCOUNTID: ${{ secrets.TECHNICALACCID_STAGE }}
TECHNICALACCOUNTEMAIL: ${{ secrets.TECHNICALACCEMAIL_STAGE }}
IMSORGID: ${{ secrets.IMSORGID_STAGE }}
SCOPES: ${{ secrets.SCOPES_STAGE }}
- name: Build
env:
AIO_RUNTIME_NAMESPACE: ${{ secrets.AIO_RUNTIME_NAMESPACE_STAGE }}
uses: adobe/aio-apps-action@3.3.0
with:
os: ${{ matrix.os }}
command: build
- name: Test
uses: adobe/aio-apps-action@3.3.0
with:
os: ${{ matrix.os }}
command: test