-
Notifications
You must be signed in to change notification settings - Fork 20
70 lines (59 loc) · 1.54 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
name: test-code-examples
on:
push:
branches:
- master
tags:
- '*'
pull_request:
branches:
- '*'
jobs:
code_examples:
name: Test code snippets
runs-on: ubuntu-latest
strategy:
matrix:
test_case: ['dapp', 'workshop', 'core']
required: ['required']
include:
- test_case: 'staking'
required: 'optional'
continue-on-error: ${{ matrix.required == 'optional' }}
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'yarn'
- name: Test style conventions
working-directory: code_examples/sdk_examples
run: |
yarn install --frozen-lockfile
yarn lint && yarn style
- name: Run tests
timeout-minutes: 60
env:
NODE_OPTIONS: --unhandled-rejections=strict
BASE_MNEMONIC: ${{ secrets.BASE_MNEMONIC }}
FAUCET_SEED: ${{ secrets.FAUCET_SEED }}
run: |
yarn install --frozen-lockfile
yarn test ${{ matrix.test_case }}
check-links:
name: Check for broken links
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'yarn'
- name: Install
run: |
yarn install --frozen-lockfile
- name: Check for broken links
run: |
yarn check-links