-
Notifications
You must be signed in to change notification settings - Fork 50
46 lines (35 loc) · 1.47 KB
/
build-lint-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
# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Node.js CI - Build + Lint + Test
on: pull_request
jobs:
build-lint-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
- name: Use Node.js v20
uses: actions/setup-node@v4
with:
node-version: "20.x"
cache: "npm"
- name: 📦 Install dependencies
run: npm ci
- name: 🔍 Run Solidity Linter
run: npm run lint:solidity
- name: 🎨 Run ESLint on JS/TS files
run: npm run lint
# This will also generate the Typechain types and the files with the constants used by the Chai tests
- name: 🏗️ Build contract artifacts
run: npm run build
# - name: 📚 generate ABI docs
# run: npm run build:docs
# - name: 🔍 check if ABI auto-generated docs need to be updated
# run: |-
# if [[ $(git diff --name-only) != "" ]];
# then
# echo "Error: Please generate ABI docs after making changes to Solidity code and Natspec comments!"
# exit 1
# fi
- name: 🧪 Run tests for each package
run: npm run test