forked from djeck1432/spotnet
-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (53 loc) · 1.54 KB
/
cairo_tests.yml
File metadata and controls
61 lines (53 loc) · 1.54 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
61
name: Cairo Tests
on:
push:
branches:
- main
paths:
- 'spotnet/cairo/*/*.rs'
- 'spotnet/cairo/*/*.cairo'
- spotnet/cairo/Scarb.toml
- spotnet/cairo/Scarb.lock
- spotnet/cairo/.tool-versions
pull_request:
branches:
- main
paths:
- 'spotnet/cairo/*/*.rs'
- 'spotnet/cairo/*/*.cairo'
- spotnet/cairo/Scarb.toml
- spotnet/cairo/Scarb.lock
- spotnet/cairo/.tool-versions
jobs:
build-and-test:
runs-on: ubuntu-latest
env:
working-directory: ./spotnet/cairo
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install asdf & tools
uses: asdf-vm/actions/install@v3
- name: Install Rust
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
- name: Install Scarb
run: |
asdf --version
asdf plugin add scarb
asdf install scarb latest
asdf global scarb latest
scarb --version
working-directory: ${{env.working-directory}}
- name: Install Starknet Foundry
run: |
asdf plugin add starknet-foundry
asdf install starknet-foundry 0.32.0
asdf global starknet-foundry 0.32.0
snforge --version
working-directory: ${{env.working-directory}}
- name: Build Cairo Contracts
run: scarb build
working-directory: ${{env.working-directory}}
- name: Run Cairo Tests
run: snforge test
working-directory: ${{env.working-directory}}