-
Notifications
You must be signed in to change notification settings - Fork 91
64 lines (51 loc) · 1.64 KB
/
build-and-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
name: Build & Test
on:
push:
pull_request:
jobs:
build-and-test:
name: Build & Test
runs-on: ubuntu-22.04
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: "20.10.0"
- name: Install dependencies
run: sudo apt -y update && sudo apt -y install libusb-1.0-0-dev libudev-dev
- name: Setup Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly-5be158ba6dc7c798a6f032026fe60fc01686b33b
- name: Yarn Install
run: yarn install --mode=skip-build && yarn allow-scripts
- name: Setup Forge
run: yarn workspace @ubiquity/contracts forge:install
- name: Build All
env:
FOUNDRY_DENY_WARNINGS: true
run: yarn build
- name: Test All
run: yarn test:all
- name: Prepare Deployment Artifact
env:
EVENT_NAME: ${{github.event_name}}
PR_NUMBER: ${{ github.event.number }}
SHA: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
run: |
echo "event_name=$EVENT_NAME,pr_number=$PR_NUMBER,sha=$SHA"
mkdir -p ./pr
echo "event_name=$EVENT_NAME,pr_number=$PR_NUMBER,sha=$SHA," > ./pr/pr_number
cd ./packages/dapp/dist && zip -r ../../../pr/pull-request.zip ./*
- uses: actions/upload-artifact@v3
with:
name: pr
path: pr/
- name: Run Server
run: yarn dev:dapp &
env:
CI: true