-
Notifications
You must be signed in to change notification settings - Fork 1
64 lines (60 loc) · 1.76 KB
/
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
59
60
61
62
63
64
name: CI
on: [push, pull_request]
jobs:
security:
name: security
runs-on: ubuntu-latest
steps:
- name: Step 1 - Check out main branch
uses: actions/checkout@v4
- name: Step 2 - Install Semgrep
run: |
pip install semgrep==1.45.0
- name: Step 3 - Run Semgrep
run: semgrep --config https://github.com/avnu-labs/semgrep-cairo-rules/releases/download/v0.0.1/cairo-rules.yaml ./src > semgrep-output.txt
- name: Step 4 - Save Semgrep Output as an Artifact
uses: actions/upload-artifact@v3
with:
name: semgrep-cairo
path: semgrep-output.txt
build:
name: build
needs: security
runs-on: ubuntu-latest
steps:
- name: Step 1 - Check out main branch
uses: actions/checkout@v4
with:
submodules: recursive
- name: Step 2 - Install dependencies
uses: ./.github/actions/install
- name: Step 3 - Trying to build
run: scarb build
- name: Step 4 - Save compilation cache
uses: actions/cache/save@v3
with:
path: |
target
key: build-${{ github.ref_name }}
test:
needs: build
name: test
runs-on: ubuntu-latest
steps:
- name: Step 1 - Check out main branch
uses: actions/checkout@v4
- name: Step 2 - Install dependencies
uses: ./.github/actions/install
- name: Step 3 - Run tests
run: snforge test
format:
needs: build
name: check-format
runs-on: ubuntu-latest
steps:
- name: Step 1 - Check out main branch
uses: actions/checkout@v4
- name: Step 2 - Install dependencies
uses: ./.github/actions/install
- name: Step 3 - Check cairo format
run: scarb fmt --check