-
Notifications
You must be signed in to change notification settings - Fork 4
174 lines (142 loc) · 4.43 KB
/
ci.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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
name: CI
on:
pull_request:
paths-ignore:
- 'packages/sdk-platforms/**'
workflow_dispatch:
jobs:
e2e-demo-app:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
submodules: recursive
# Start node
- name: Era Test Node Action
uses: dutterbutter/era-test-node-action@36ffd2eefd46dc16e7e2a8e1715124400ec0a3ba # v1
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9.11.0
- name: Use Node.js
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4
with:
node-version: lts/Iron
cache: pnpm
# Install dependencies for repo
- name: Install dependencies
run: pnpm install -r --frozen-lockfile
# Install dependencies for the submodule
- name: Install contract dependencies
run: pnpm install -r --frozen-lockfile
working-directory: packages/contracts
- name: Build SDK
run: pnpm nx build sdk
- name: Build contracts
run: pnpm build
working-directory: packages/contracts
- name: Deploy contracts
run: pnpm run deploy
working-directory: packages/contracts
- name: Run tests
run: pnpm test
working-directory: packages/sdk
# Run E2E tests
- name: Install Playwright Chromium Browser
run: pnpm exec playwright install chromium
working-directory: examples/demo-app
- name: Run e2e tests
run: pnpm nx e2e demo-app
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: demo-app-playwright-report
path: examples/demo-app/playwright-report/
retention-days: 3
e2e-nft-quest:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
submodules: recursive
# Start node
- name: Era Test Node Action
uses: dutterbutter/era-test-node-action@36ffd2eefd46dc16e7e2a8e1715124400ec0a3ba # v1
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9.11.0
- name: Use Node.js
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4
with:
node-version: lts/Iron
cache: pnpm
# Install dependencies for repo
- name: Install dependencies
run: pnpm install -r --frozen-lockfile
# Install dependencies for the submodule
- name: Install contract dependencies
run: pnpm install -r --frozen-lockfile
working-directory: packages/contracts
- name: Build SDK
run: pnpm nx build sdk
- name: Build contracts
run: pnpm build
working-directory: packages/contracts
- name: Deploy contracts
run: pnpm run deploy
working-directory: packages/contracts
- name: Deploy NFT contracts
run: pnpm nx deploy:local nft-quest-contracts
# Run E2E tests
- name: Install Playwright Chromium Browser
run: pnpm exec playwright install chromium
working-directory: examples/nft-quest
- name: Run e2e tests
run: pnpm nx e2e nft-quest
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: nft-quest-playwright-report
path: examples/nft-quest/playwright-report/
retention-days: 3
contracts:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
submodules: recursive
# Start node
- name: Era Test Node Action
uses: dutterbutter/era-test-node-action@36ffd2eefd46dc16e7e2a8e1715124400ec0a3ba # v1
# Setup pnpm
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9.11.0
- name: Use Node.js
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4
with:
node-version: lts/Iron
cache: pnpm
# Install dependencies for the submodule
- name: Install contract dependencies
run: pnpm install -r --frozen-lockfile
working-directory: packages/contracts
# Build contracts and generate types
- name: Build contracts
run: pnpm build
working-directory: packages/contracts
# Run contract tests
- name: Run contract test
run: pnpm test
working-directory: packages/contracts