-
Notifications
You must be signed in to change notification settings - Fork 65
58 lines (43 loc) · 1.53 KB
/
cairo-ci.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
name: Cairo CI
env:
ARCHIVE_LINK: https://github.com/starkware-libs/cairo/releases/download/v2.0.0/release-x86_64-unknown-linux-musl.tar.gz
ARCHIVE_NAME: cairo.zip
on: push
jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: Step 1 - Check out main branch
uses: actions/checkout@v3
- name: Step 2 - Downloading binaries
run: curl -L -o $ARCHIVE_NAME $ARCHIVE_LINK
- name: Step 3 - Unzipping binaries
run: tar -xvf $ARCHIVE_NAME
- name: Step 4 - Make binaries available
run: echo "./cairo/bin" >> $GITHUB_PATH
- name: Step 5 - Run all tests
run: cairo-test --starknet ./contracts
format:
runs-on: ubuntu-latest
steps:
- name: Step 1 - Check out main branch
uses: actions/checkout@v3
- name: Step 2 - Downloading binaries
run: curl -L -o $ARCHIVE_NAME $ARCHIVE_LINK
- name: Step 3 - Unzipping binaries
run: tar -xvf $ARCHIVE_NAME
- name: Step 4 - Make binaries available
run: echo "./cairo/bin" >> $GITHUB_PATH
- name: Step 5 - Check formatting
run: cairo-format --check --recursive ./contracts
contract-approvers:
runs-on: ubuntu-latest
steps:
- name: Step 1 - Check out main branch
uses: actions/checkout@v3
- name: Step 2 - Install project
run: yarn install --frozen-lockfile
- name: Step 3 - Check approvers count
run: yarn ts-node ./scripts/check-contract-approvers.ts 3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}