Skip to content

Commit c96c25a

Browse files
committed
Merge branch 'gio/fix-fuzzy-tests': Add CI/CD workflow and fix dependency management
2 parents 53fd521 + 1407004 commit c96c25a

4 files changed

Lines changed: 90 additions & 39 deletions

File tree

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: CI
2+
3+
on: pull_request
4+
5+
jobs:
6+
tests:
7+
name: Flow CLI Tests
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
with:
12+
token: ${{ secrets.GH_PAT }}
13+
submodules: "true"
14+
- name: Set up Go
15+
uses: actions/setup-go@v3
16+
with:
17+
go-version: "1.23.x"
18+
- uses: actions/cache@v4
19+
with:
20+
path: ~/go/pkg/mod
21+
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
22+
restore-keys: |
23+
${{ runner.os }}-go-
24+
- name: Install Flow CLI
25+
run: sh -ci "$(curl -fsSL https://raw.githubusercontent.com/onflow/flow-cli/master/install.sh)"
26+
- name: Flow CLI Version
27+
run: flow version
28+
- name: Update PATH
29+
run: echo "/root/.local/bin" >> $GITHUB_PATH
30+
- name: Install dependencies
31+
run: flow deps install --skip-alias --skip-deployments
32+
- name: Run tests
33+
run: flow test --cover --covercode="contracts" --coverprofile="coverage.lcov" ./cadence/tests/*_test.cdc

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11

22
# flow
3-
emulator-account.pkey
3+
*.pkey
44
imports
5+
coverage.lcov
6+
coverage.json

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "DeFiBlocks"]
2+
path = DeFiBlocks
3+
url = https://github.com/onflow/DeFiBlocks

flow.json

Lines changed: 51 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,80 @@
11
{
22
"contracts": {
3+
"DFB": {
4+
"source": "./DeFiBlocks/cadence/contracts/interfaces/DFB.cdc",
5+
"aliases": {
6+
"testing": "0000000000000008"
7+
}
8+
},
39
"TidalProtocol": {
410
"source": "./cadence/contracts/TidalProtocol.cdc",
511
"aliases": {
6-
"testing": "0x0000000000000007"
12+
"testing": "0000000000000007"
13+
}
14+
}
15+
},
16+
"dependencies": {
17+
"Burner": {
18+
"source": "mainnet://f233dcee88fe0abe.Burner",
19+
"hash": "71af18e227984cd434a3ad00bb2f3618b76482842bae920ee55662c37c8bf331",
20+
"aliases": {
21+
"emulator": "f8d6e0586b0a20c7",
22+
"mainnet": "f233dcee88fe0abe",
23+
"testnet": "9a0766d93b6608b7"
724
}
825
},
9-
"DFB": {
10-
"source": "./DeFiBlocks/cadence/contracts/interfaces/DFB.cdc",
26+
"FlowToken": {
27+
"source": "mainnet://1654653399040a61.FlowToken",
28+
"hash": "cefb25fd19d9fc80ce02896267eb6157a6b0df7b1935caa8641421fe34c0e67a",
1129
"aliases": {
12-
"testing": "0x0000000000000008"
30+
"emulator": "0ae53cb6e3f42a79",
31+
"mainnet": "1654653399040a61",
32+
"testnet": "7e60df042a9c0868"
1333
}
1434
},
1535
"FungibleToken": {
1636
"source": "mainnet://f233dcee88fe0abe.FungibleToken",
37+
"hash": "23c1159cf99b2b039b6b868d782d57ae39b8d784045d81597f100a4782f0285b",
1738
"aliases": {
18-
"emulator": "0xee82856bf20e2aa6",
19-
"testnet": "0x9a0766d93b6608b7",
20-
"mainnet": "0xf233dcee88fe0abe",
21-
"testing": "0x0000000000000002"
39+
"emulator": "ee82856bf20e2aa6",
40+
"mainnet": "f233dcee88fe0abe",
41+
"testnet": "9a0766d93b6608b7"
2242
}
2343
},
2444
"FungibleTokenMetadataViews": {
2545
"source": "mainnet://f233dcee88fe0abe.FungibleTokenMetadataViews",
46+
"hash": "dff704a6e3da83997ed48bcd244aaa3eac0733156759a37c76a58ab08863016a",
2647
"aliases": {
27-
"emulator": "0xee82856bf20e2aa6",
28-
"testnet": "0x9a0766d93b6608b7",
29-
"mainnet": "0xf233dcee88fe0abe",
30-
"testing": "0x0000000000000002"
31-
}
32-
},
33-
"ViewResolver": {
34-
"source": "mainnet://1d7e57aa55817448.ViewResolver",
35-
"aliases": {
36-
"emulator": "0xf8d6e0586b0a20c7",
37-
"testnet": "0x631e88ae7f1d7c20",
38-
"mainnet": "0x1d7e57aa55817448",
39-
"testing": "0x0000000000000001"
48+
"emulator": "ee82856bf20e2aa6",
49+
"mainnet": "f233dcee88fe0abe",
50+
"testnet": "9a0766d93b6608b7"
4051
}
4152
},
4253
"MetadataViews": {
4354
"source": "mainnet://1d7e57aa55817448.MetadataViews",
55+
"hash": "10a239cc26e825077de6c8b424409ae173e78e8391df62750b6ba19ffd048f51",
4456
"aliases": {
45-
"emulator": "0xf8d6e0586b0a20c7",
46-
"testnet": "0x631e88ae7f1d7c20",
47-
"mainnet": "0x1d7e57aa55817448",
48-
"testing": "0x0000000000000001"
57+
"emulator": "f8d6e0586b0a20c7",
58+
"mainnet": "1d7e57aa55817448",
59+
"testnet": "631e88ae7f1d7c20"
4960
}
5061
},
51-
"Burner": {
52-
"source": "mainnet://f233dcee88fe0abe.Burner",
62+
"NonFungibleToken": {
63+
"source": "mainnet://1d7e57aa55817448.NonFungibleToken",
64+
"hash": "b63f10e00d1a814492822652dac7c0574428a200e4c26cb3c832c4829e2778f0",
5365
"aliases": {
54-
"emulator": "0xf8d6e0586b0a20c7",
55-
"testnet": "0x9a0766d93b6608b7",
56-
"mainnet": "0xf233dcee88fe0abe",
57-
"testing": "0x0000000000000001"
66+
"emulator": "f8d6e0586b0a20c7",
67+
"mainnet": "1d7e57aa55817448",
68+
"testnet": "631e88ae7f1d7c20"
5869
}
5970
},
60-
"FlowToken": {
61-
"source": "mainnet://1654653399040a61.FlowToken",
71+
"ViewResolver": {
72+
"source": "mainnet://1d7e57aa55817448.ViewResolver",
73+
"hash": "374a1994046bac9f6228b4843cb32393ef40554df9bd9907a702d098a2987bde",
6274
"aliases": {
63-
"emulator": "0x0ae53cb6e3f42a79",
64-
"testnet": "0x7e60df042a9c0868",
65-
"mainnet": "0x1654653399040a61",
66-
"testing": "0x0000000000000003"
75+
"emulator": "f8d6e0586b0a20c7",
76+
"mainnet": "1d7e57aa55817448",
77+
"testnet": "631e88ae7f1d7c20"
6778
}
6879
}
6980
},
@@ -84,7 +95,9 @@
8495
},
8596
"deployments": {
8697
"emulator": {
87-
"emulator-account": ["TidalProtocol"]
98+
"emulator-account": [
99+
"TidalProtocol"
100+
]
88101
}
89102
}
90103
}

0 commit comments

Comments
 (0)