-
Notifications
You must be signed in to change notification settings - Fork 79
55 lines (46 loc) · 1.26 KB
/
contract_checks.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
name: CI
on:
pull_request:
jobs:
check-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check for changes
uses: dorny/paths-filter@v3
id: changes
with:
filters: |
contracts_dir:
- 'contracts/src/**'
- name: Install scarb
if: steps.changes.outputs.contracts_dir == 'true'
run: |
cd contracts
asdf install scarb
- name: Run scarb fmt
if: steps.changes.outputs.contracts_dir == 'true'
run: |
cd contracts
scarb fmt
check-contracts-changes:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check for changes
uses: dorny/paths-filter@v3
id: changes
with:
filters: |
contracts_dir:
- 'contracts/src/**'
- name: Install scarb
if: steps.changes.outputs.contracts_dir == 'true'
run: |
run: cd contracts
curl --proto '=https' --tlsv1.2 -sSf https://docs.swmansion.com/scarb/install.sh | sh
- name: Run scarb check
if: steps.changes.outputs.contracts_dir == 'true'
run: |
run: cd contracts
scarb check