forked from OpenZeppelin/cairo-contracts
-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (31 loc) · 823 Bytes
/
test.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
name: Lint and test
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
lint_and_test:
name: Lint and test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Extract scarb version
run: |
SCARB_VERSION=$(grep 'cairo-version = ' Scarb.toml | sed 's/cairo-version = "\(.*\)"/\1/')
echo "SCARB_VERSION=$SCARB_VERSION" >> $GITHUB_ENV
- uses: software-mansion/setup-scarb@v1
with:
scarb-version: ${{ env.SCARB_VERSION }}
- name: Markdown lint
uses: DavidAnson/markdownlint-cli2-action@5b7c9f74fec47e6b15667b2cc23c63dff11e449e # v9
with:
globs: |
*.md
!PULL_REQUEST_TEMPLATE.md
- name: Cairo lint
run: scarb fmt --check
- name: Cairo test
run: scarb test