-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (46 loc) · 1.3 KB
/
test.yml
File metadata and controls
60 lines (46 loc) · 1.3 KB
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
name: Cairo Contract Tests
on:
push:
branches:
- main
- dev
pull_request:
branches:
- main
- dev
env:
SCARB_VERSION: 2.8.5
SNFORGE_VERSION: 0.35.1
CAIRO_VERSION: 2.8.5
jobs:
test:
name: Run Contract Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install scarb
run: curl --proto '=https' --tlsv1.2 -sSf https://docs.swmansion.com/scarb/install.sh | sh -s -- -v $SCARB_VERSION
- name: Install snfoundryup
run: curl -L https://raw.githubusercontent.com/foundry-rs/starknet-foundry/master/scripts/install.sh | sh
- name: Install snforge
run: snfoundryup -v $SNFORGE_VERSION
- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
~/.scarb
~/.snfoundry
target
key: ${{ runner.os }}-scarb-${{ hashFiles('**/Scarb.toml') }}
restore-keys: |
${{ runner.os }}-scarb-
- name: Check Scarb version
run: scarb --version
- name: Check SNForge version
run: snforge --version
- name: Build contracts
run: scarb build
working-directory: contracts
- name: Run tests
run: snforge test
working-directory: contracts