Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unit test workflow #1

Merged
merged 4 commits into from
Apr 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Unit Tests

on:
pull_request:
branches: [main]
push:
branches: [main]


jobs:
tests:
name: Flow CLI Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: "true"
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18
- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: ^18
- name: Install Flow dependencies
run: npm i
- name: Install Flow CLI
run: bash -ci "$(curl -fsSL https://raw.githubusercontent.com/onflow/flow-cli/master/install.sh)" -- v1.17.0
- name: Run tests
run: sh ./run-tests.sh
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: Flowtyio/flowty-drops
2 changes: 1 addition & 1 deletion contracts/DropFactory.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub contract DropFactory {
minterCap: Capability<&{FlowtyDrops.Minter}>
): @FlowtyDrops.Drop {
pre {
Type<@FungibleToken.Vault>().isSubtype(of: paymentTokenType): "paymentTokenType must be a FungibleToken"
paymentTokenType.isSubtype(of: Type<@FungibleToken.Vault>()): "paymentTokenType must be a FungibleToken"
}

// This drop is always on and never ends.
Expand Down
1 change: 1 addition & 0 deletions tests/test_helpers.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ pub fun deployAll() {
deploy("FlowtySwitches", "../contracts/FlowtySwitches.cdc", [])
deploy("FlowtyPricers", "../contracts/FlowtyPricers.cdc", [])
deploy("FlowtyAddressVerifiers", "../contracts/FlowtyAddressVerifiers.cdc", [])
deploy("DropFactory", "../contracts/DropFactory.cdc", [])

deploy("OpenEditionNFT", "../contracts/nft/OpenEditionNFT.cdc", [])
}
Expand Down
Loading