-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (35 loc) · 1.17 KB
/
main.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
name: Run public tests
on:
pull_request:
branches: [ "main" ]
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Fetch `noir-json-parser` repo
uses: actions/checkout@v3
- name: Fetch `noir-json-parser-tests` repo
run: |
cd ../
git clone https://github.com/rontosoft/noir-json-parser-tests.git tests
- name: Install nargo as indicated in project .toml file
run: |
# extract version from toml: take the line with version, split it by ", echo 2nd element from that array
version=$(grep 'compiler_version[ ]*=[ ]*' Nargo.toml | awk -F '"' '{print $2}')
cd ../
echo Downloading Nargo $version
url="https://github.com/noir-lang/noir/releases/download/v${version}/nargo-x86_64-unknown-linux-gnu.tar.gz"
curl -L "$url" | tar -xz -C .
chmod +x nargo
- name: Run tests
run: |
cd ../
mv noir-json-parser lib
cd tests
../nargo test --silence-warnings
# git cleanup: rename folder for auto-delete
cd ../
mv lib noir-json-parser