File tree 2 files changed +64
-0
lines changed
2 files changed +64
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Run Cadence Lint
2
+ on : push
3
+
4
+ jobs :
5
+ run-cadence-lint :
6
+ runs-on : macos-latest
7
+ steps :
8
+ - name : Checkout
9
+ uses : actions/checkout@v3
10
+ with :
11
+ submodules : ' true'
12
+
13
+ - name : Install Flow CLI
14
+ run : |
15
+ brew update
16
+ brew install flow-cli
17
+
18
+ - name : Initialize Flow
19
+ run : |
20
+ if [ ! -f flow.json ]; then
21
+ echo "Initializing Flow project..."
22
+ flow init
23
+ else
24
+ echo "Flow project already initialized."
25
+ fi
26
+
27
+ - name : Run Cadence Lint
28
+ run : |
29
+ echo "Running Cadence linter on all .cdc files in the current repository"
30
+ flow cadence lint **/*.cdc
Original file line number Diff line number Diff line change
1
+ name : Run Cadence Tests
2
+ on : push
3
+
4
+ jobs :
5
+ run-cadence-tests :
6
+ runs-on : macos-latest
7
+ steps :
8
+ - name : Checkout
9
+ uses : actions/checkout@v3
10
+ with :
11
+ submodules : ' true'
12
+
13
+ - name : Install Flow CLI
14
+ run : |
15
+ brew update
16
+ brew install flow-cli
17
+
18
+ - name : Initialize Flow
19
+ run : |
20
+ if [ ! -f flow.json ]; then
21
+ echo "Initializing Flow project..."
22
+ flow init
23
+ else
24
+ echo "Flow project already initialized."
25
+ fi
26
+
27
+ - name : Run Cadence Tests
28
+ run : |
29
+ if test -f "cadence/tests.cdc"; then
30
+ echo "Running Cadence tests in the current repository"
31
+ flow test cadence/tests.cdc
32
+ else
33
+ echo "No Cadence tests found. Skipping tests."
34
+ fi
You can’t perform that action at this time.
0 commit comments