This repository has been archived by the owner on Sep 5, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 69
116 lines (93 loc) · 2.61 KB
/
test-behaviour.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
name: Behaviour tests
on:
push:
branches:
- main
- develop
- cairo-1.0
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CAIRO_LANG_VERSION: 0.11.0.2
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '16.x'
cache: 'yarn'
- name: Setup Python
uses: actions/setup-python@v2.2.2
with:
python-version: 3.9 # Cairo was tested with this version
- name: Install dependencies
run: |
yarn
pipx install black[colors]
pip install cairo-lang=="$CAIRO_LANG_VERSION"
- name: Build warplib
run: yarn warplib
- name: Check formatting
run: |
yarn lint
black starknet-testnet/ --check --verbose --diff --color
# find warplib/ -iname *.cairo -exec cairo-format -c {} +
compilation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '16.x'
cache: 'yarn'
- name: Setup Python
uses: actions/setup-python@v2.2.2
with:
python-version: 3.9 # Cairo was tested with this version
- name: Install dependencies
run: |
make
make compile
- name: Setup warp_venv
run: bin/warp install --python python --verbose
- name: Build warplib
run: yarn warplib
- name: Test warplib
run: yarn test:lib
- name: Running compilation tests
run: make test_compilation
test-behaviour:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '16.x'
cache: 'yarn'
- name: Setup Python
uses: actions/setup-python@v2.2.2
with:
python-version: 3.9 # Cairo was tested with this version
- name: Install dependencies
run: |
make
make compile
- name: Setup warp_venv
run: bin/warp install --python python --verbose
- name: Build warplib
run: yarn warplib
- name: Test code execution
run: |
starknet-devnet &
yarn test:behaviour
env:
STARKNET_NETWORK: alpha-goerli
STARKNET_WALLET: starkware.starknet.wallets.open_zeppelin.OpenZeppelinAccount
STARKNET_ACCOUNT_DIR: $PWD/.starknet_accounts_devnet