-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fd53e4f
commit 9b48f73
Showing
2 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Run Cadence Lint | ||
on: push | ||
|
||
jobs: | ||
run-cadence-lint: | ||
runs-on: macos-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: 'true' | ||
|
||
- name: Install Flow CLI | ||
run: | | ||
brew update | ||
brew install flow-cli | ||
- name: Initialize Flow | ||
run: | | ||
if [ ! -f flow.json ]; then | ||
echo "Initializing Flow project..." | ||
flow init | ||
else | ||
echo "Flow project already initialized." | ||
fi | ||
- name: Run Cadence Lint | ||
run: | | ||
echo "Running Cadence linter on all .cdc files in the current repository" | ||
flow cadence lint **/*.cdc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Run Cadence Tests | ||
on: push | ||
|
||
jobs: | ||
run-cadence-tests: | ||
runs-on: macos-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: 'true' | ||
|
||
- name: Install Flow CLI | ||
run: | | ||
brew update | ||
brew install flow-cli | ||
- name: Initialize Flow | ||
run: | | ||
if [ ! -f flow.json ]; then | ||
echo "Initializing Flow project..." | ||
flow init | ||
else | ||
echo "Flow project already initialized." | ||
fi | ||
- name: Run Cadence Tests | ||
run: | | ||
if test -f "cadence/tests.cdc"; then | ||
echo "Running Cadence tests in the current repository" | ||
flow test cadence/tests.cdc | ||
else | ||
echo "No Cadence tests found. Skipping tests." | ||
fi |