-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (36 loc) · 1.09 KB
/
check.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
name: check
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
permissions: read-all
jobs:
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: asdf-vm/actions/install@v3
- run: scarb fmt --check
working-directory: contracts
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: asdf-vm/actions/install@v3
- run: scarb test
working-directory: contracts
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: asdf-vm/actions/install@v3
- run: curl -L https://raw.githubusercontent.com/software-mansion/cairo-coverage/main/scripts/install.sh | sh
- name: Run tests and generate report
run: cd contracts/ && snforge test --coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
file: ./coverage.lcov
token: ${{ secrets.CODECOV_TOKEN }}