-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (38 loc) · 1013 Bytes
/
ci.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
name: CI
on:
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "22.0.0"
- name: Install Dependencies
run: yarn
- name: Run Prettier
run: yarn prettier
- name: Run Tests
run: |
yarn test | tee test_output.txt
- name: Find Gas Report
id: find_report
run: |
file_path=$(sed -n 's/CSV file saved to: //p' test_output.txt | xargs)
if [ -z "$file_path" ]; then
echo "No gas report found."
exit 1
else
echo "Found gas report at $file_path"
mv "$file_path" gas_report.csv
fi
- name: Upload Gas Report
uses: actions/upload-artifact@v4
with:
name: gas_report.csv
path: gas_report.csv