-
Notifications
You must be signed in to change notification settings - Fork 0
86 lines (68 loc) · 2.03 KB
/
on-pull-request.yaml
File metadata and controls
86 lines (68 loc) · 2.03 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
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
name: CI
on:
pull_request:
types:
- opened
- reopened
- synchronize
- auto_merge_enabled
- edited
concurrency:
group: >
${{ github.workflow }}-
${{ github.ref }}-
${{ github.event_name == 'pull_request' && 'PR' || github.sha }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
cairo_tests:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Starknet Foundry
uses: foundry-rs/setup-snfoundry@v3
with:
starknet-foundry-version: "0.45.0"
- name: Install scarb
uses: software-mansion/setup-scarb@v1
with:
scarb-version: "2.11.4"
- name: Install cairo-coverage
run: |
curl -L https://raw.githubusercontent.com/software-mansion/cairo-coverage/main/scripts/install.sh | sh
- name: Check Cairo formatting
run: scarb fmt -w --check
- name: Run test and coverage
run: scarb test -w --coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
verbose: true
python_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install asdf
run: scripts/install_asdf.sh
- name: Install starknet-devnet
run: |
asdf plugin add starknet-devnet
asdf install starknet-devnet 0.3.0
asdf global starknet-devnet 0.3.0
- name: Install scarb
uses: software-mansion/setup-scarb@v1
with:
scarb-version: "2.11.4"
- name: Build Contracts
run: scarb build
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip'
- name: Install python testdependencies
run: pip install -r py_requirements.txt
- name: Run Python Tests
run: scripts/python_tests.sh