-
Notifications
You must be signed in to change notification settings - Fork 16
45 lines (33 loc) · 945 Bytes
/
test.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
name: Testing
on:
- pull_request
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: blacksmith-2vcpu-ubuntu-2204
steps:
- uses: actions/checkout@v4
- name: Install Node.js
uses: useblacksmith/setup-node@v5
with:
node-version: 18.x
cache: 'npm'
- name: Install Dependencies
run: npm ci
- name: Build project and capture output
run: npm run build > build.log 2>&1
- name: Check for build errors
run: |
if grep -q -i "error" build.log || grep -q -i "warning" build.log; then
echo "Build contains following errors or warnings..."
cat build.log
exit 1;
else
exit 0;
fi
- name: Set environment variable
run: export CHECK_CONTRACT_SIZE=true
- name: Test
run: npm run test