-
Notifications
You must be signed in to change notification settings - Fork 74
47 lines (38 loc) · 1.15 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
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:
- 'src/**'
- name: Install scarb
if: steps.changes.outputs.contracts_dir == 'true'
run: curl --proto '=https' --tlsv1.2 -sSf https://docs.swmansion.com/scarb/install.sh | sh
- name: Run scarb fmt
if: steps.changes.outputs.contracts_dir == 'true'
run: 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:
- 'src/**'
- name: Install scarb
if: steps.changes.outputs.contracts_dir == 'true'
run: 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: scarb check