-
Notifications
You must be signed in to change notification settings - Fork 13
50 lines (41 loc) · 1.3 KB
/
ci-test.yml
File metadata and controls
50 lines (41 loc) · 1.3 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
name: "ci"
on:
pull_request:
branches: [main]
push:
branches: [main]
jobs:
test:
name: run sdk tests
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- name: checkout code
uses: actions/checkout@v4
- name: setup node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- name: installing dependencies
run: npm ci
- name: run unit tests (on pr)
if: github.event_name == 'pull_request'
run: npm run test:unit -- --reporters=default --reporters=jest-junit
- name: run all tests
if: github.event_name == 'push'
run: npm run test:ci
env:
WHITELISTED_WALLET_PRIVATE_KEY: ${{ secrets.WHITELISTED_WALLET_PRIVATE_KEY }}
SELLER_ENTITY_ID: ${{ secrets.SELLER_ENTITY_ID }}
SELLER_AGENT_WALLET_ADDRESS: ${{ secrets.SELLER_AGENT_WALLET_ADDRESS }}
BUYER_ENTITY_ID: ${{ secrets.BUYER_ENTITY_ID }}
BUYER_AGENT_WALLET_ADDRESS: ${{ secrets.BUYER_AGENT_WALLET_ADDRESS }}
- name: uploads results
uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: test-results
path: junit.xml