-
Notifications
You must be signed in to change notification settings - Fork 71
148 lines (106 loc) · 3.52 KB
/
test.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
name: SX-Starknet Workflow
env:
STARKNET_SIERRA_COMPILE_PATH: ./cairo/bin/starknet-sierra-compile
OBJC_DISABLE_INITIALIZE_FORK_SAFETY: YES
ADDRESS: "0x347be35996a21f6bf0623e75dbce52baba918ad5ae8d83b6f416045ab22961a"
PK: "0xbdd640fb06671ad11c80317fa3b1799d"
on:
push:
branches:
- develop
pull_request:
jobs:
# solidity:
# strategy:
# fail-fast: true
# name: Forge tests
# runs-on: ubuntu-latest
# steps:
# - name: Step 1 - Check out main branch
# uses: actions/checkout@v3
# with:
# submodules: recursive
# - name: Step 2 - Install Foundry
# uses: foundry-rs/foundry-toolchain@v1
# with:
# version: nightly
# - name: Step 3 - Check formatting
# working-directory: ./ethereum
# run: forge fmt --check
# - name: Step 4 - Build Solidity contracts
# working-directory: ./ethereum
# run: |
# forge --version
# forge build --sizes
# id: build
# - name: Step 5 - Run Forge tests
# working-directory: ./ethereum
# run: |
# forge test -vvv
# id: test
cairo:
strategy:
fail-fast: true
name: Cairo tests
runs-on: ubuntu-20.04
steps:
- name: Step 1 - Check out main branch
uses: actions/checkout@v3
- name: Set up node
uses: actions/setup-node@v3
with:
node-version: 18.16.0
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache YARN dependencies
uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
yarn-
- name: Install yarn dependencies
run: yarn install
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install dependencies
run: |
sudo apt install -y libgmp3-dev
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Install Cairo
run: curl -L https://github.com/starkware-libs/cairo/releases/download/v2.2.0/release-x86_64-unknown-linux-musl.tar.gz > cairo.tar.gz
- name: extract Cairo
run: tar -xvf cairo.tar.gz
# - name: Step 2 = Install Cairo
# uses: software-mansion/setup-cairo@v1
- name: Step 2 - Install Scarb
uses: software-mansion/setup-scarb@v1
with:
scarb-version: 0.7.0
- name: demo
run: ./cairo/bin/starknet-sierra-compile --version
- name: Print name
run: echo "Hello $STARKNET_SIERRA_COMPILE_PATH"
- name: Compile Cairo contracts
run: yarn hardhat starknet-build
- name: run test
run: yarn test:l1-execution
# - name: Step 2 = Install Cairo
# uses: software-mansion/setup-cairo@v1
# - name: Step 2 - Install Scarb
# uses: software-mansion/setup-scarb@v1
# with:
# scarb-version: 0.7.0
# - name: Step 3 - Check formatting
# working-directory: ./starknet
# run: scarb fmt --check
# - name: Step 4 - Build Cairo contracts
# working-directory: ./starknet
# run: scarb build --verbose
# - name: Step 4 - Running Cairo tests
# working-directory: ./starknet
# run: scarb test --verbose