-
Notifications
You must be signed in to change notification settings - Fork 2
72 lines (58 loc) · 1.8 KB
/
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
67
68
69
70
71
72
name: Tests
on:
pull_request:
branches:
- "**"
env:
BEE_VERSION: "1.8.2"
jobs:
test:
name: runtime tests
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
# env:
# PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: 'true'
steps:
- name: checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- uses: actions/cache@v3
id: npm-cache # use this to check for `cache-hit` ==> if: steps.npm-cache.outputs.cache-hit != 'true'
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install npm deps
if: steps.npm-cache.outputs.cache-hit != 'true'
run: npm ci --cache .npm
- name: Check types
run: npm run check:types
- name: Lint check
run: npm run lint:check
- name: Install fdp-play
run: npm install -g @fairdatasociety/fdp-play
- name: Run fdp-play
run: fdp-play start -d --bee-version $BEE_VERSION
- name: copy config
run: cp .test.env .env
- name: buy stamps and npm start
run: |
curl -s -XPOST http://localhost:1635/stamps/10000000/18 | npm run start:batch --batch=$(cut -c 13-76) &
env:
CI: false
- name: wait for environment and batch
run: sleep 200
- name: tests
run: |
export DISPLAY=:99
chromedriver --url-base=/wd/hub &
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 &
npm run test:puppeteer