-
Notifications
You must be signed in to change notification settings - Fork 10
71 lines (58 loc) · 1.6 KB
/
test_sdk.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
name: CI-Sdk
on:
pull_request:
branches:
- main
paths:
- "packages/sdk/**"
push:
branches:
- main
paths:
- "packages/sdk/**"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
concurrency:
group: ${{github.workflow}}-${{github.ref}}
cancel-in-progress: true
jobs:
build:
name: Build, lint, and test on Node ${{ matrix.node }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
node: ['14.x']
os: [ubuntu-latest]
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Use Node ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: "yarn"
- name: Install deps and build (with cache)
uses: bahmutov/npm-install@v1
with:
useLockFile: false
working-directory: packages/sdk
- name: Lint
run: yarn lint
working-directory: packages/sdk
- name: "Create env file"
run: |
touch .env
echo export INFURA_ID="${{ secrets.INFURA_ID }}" >> .env
echo export ALCHEMY_ID_CHAIN_420="${{ secrets.ALCHEMY_ID_CHAIN_420 }}" >> .env
cat .env
working-directory: packages/sdk
- name: "Test env file"
run: |
cat .env
working-directory: packages/sdk
- name: Test
run: source .env && yarn test --ci --maxWorkers=2
working-directory: packages/sdk
- name: Build
run: yarn build
working-directory: packages/sdk