-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (79 loc) · 1.94 KB
/
build.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
73
74
75
76
77
78
79
80
81
82
83
84
name: Build
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
env:
FOUNDRY_PROFILE: ci
jobs:
foundry:
name: Foundry project
runs-on: ubuntu-latest
defaults:
run:
working-directory: contracts
strategy:
fail-fast: true
steps:
- uses: actions/checkout@master
with:
submodules: recursive
- name: Install Task
uses: arduino/setup-task@v2
with:
version: 3.x
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Run Forge build
run: |
forge --version
task contracts-build
id: build
- name: Run Forge tests
run: |
task contracts-test
id: test
dapp:
name: Vue.js dapp
runs-on: ubuntu-latest
defaults:
run:
working-directory: dapp
steps:
- uses: actions/checkout@master
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- uses: actions/setup-node@master
with:
node-version: 20
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: latest
run_install: false
node-version: 20
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Install Task
uses: arduino/setup-task@v2
with:
version: 3.x
- name: Generate ABI with foundry
run: task contracts-build
- name: Installing project dependencies
run: pnpm install
- name: Build and tests
run: |
pnpm run build
pnpm run coverage
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}