-
Notifications
You must be signed in to change notification settings - Fork 47
87 lines (70 loc) · 2.02 KB
/
ci.yaml
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
on:
push:
branches:
- main
pull_request:
branches:
- "*"
workflow_dispatch:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "18.x"
- name: npm latest
run: npm i -g npm@8 && npm i -g npm@latest
- name: Cache Node Modules
id: cache-node-modules
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
path: |
node_modules
client/node_modules
server/node_modules
coc/node_modules
test/e2e/node_modules
test/protocol/node_modules
test/protocol/projects/hardhat/node_modules
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }}
- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: npm install
- name: Lint
run: npm run lint
- name: Download foundryup
if: runner.os != 'Windows'
run: curl -L https://foundry.paradigm.xyz | bash
- name: Install foundry
if: runner.os != 'Windows'
run: ${XDG_CONFIG_HOME:-$HOME}/.foundry/bin/foundryup
- name: Build project
run: npm run build
- name: Run server tests
run: npm run test:codecov
- name: Run protocol tests
run: npm run test:protocol
- name: Cache VS Code client
id: cache-vscode
uses: actions/cache@v3
env:
cache-name: cache-vscode
with:
path: .vscode-test
key: ${{ runner.os }}-vscode-1.70.2
- name: Run E2E tests
uses: coactions/setup-xvfb@v1.0.1
with:
run: npm run test:e2e
- name: Package the extension
run: npm run package