Skip to content

Commit

Permalink
GH config
Browse files Browse the repository at this point in the history
  • Loading branch information
lealobanov committed Nov 29, 2024
1 parent f651afa commit e360b7f
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/cadence_lint.yml
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
34 changes: 34 additions & 0 deletions .github/workflows/cadence_tests.yml
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
16 changes: 16 additions & 0 deletions flow.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"contracts": {
"Counter": {
"source": "cadence/contracts/Counter.cdc",
"aliases": {
"testing": "0000000000000007"
}
}
},
"networks": {
"emulator": "127.0.0.1:3569",
"mainnet": "access.mainnet.nodes.onflow.org:9000",
"testing": "127.0.0.1:3569",
"testnet": "access.devnet.nodes.onflow.org:9000"
}
}

0 comments on commit e360b7f

Please sign in to comment.