Skip to content

Commit db0694c

Browse files
committed
add github action
1 parent c457b84 commit db0694c

5 files changed

Lines changed: 39 additions & 6 deletions

File tree

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: IncrementFi
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
tests:
13+
name: IncrementFi Tests
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
with:
18+
token: ${{ secrets.GH_PAT }}
19+
submodules: "true"
20+
- name: Install Flow CLI
21+
run: sh -ci "$(curl -fsSL https://raw.githubusercontent.com/onflow/flow-cli/master/install.sh)"
22+
- name: Flow CLI Version
23+
run: flow version
24+
- name: Update PATH
25+
run: echo "/root/.local/bin" >> $GITHUB_PATH
26+
- name: Run emulator
27+
run: ./local/run_emulator.sh
28+
- name: Create wallets
29+
run: ./local/setup_wallets.sh
30+
- name: Install Flow deps
31+
run: flow deps install
32+
- name: Setup PunchSwap
33+
run: ./local/incrementfi/setup_incrementfi.sh

cadence/scripts/mocks/amm/get_moet_token_identifier.cdc renamed to cadence/scripts/mocks/incrementfi/get_moet_token_identifier.cdc

File renamed without changes.
File renamed without changes.

cadence/scripts/mocks/amm/get_yield_token_identifier.cdc renamed to cadence/scripts/mocks/incrementfi/get_yield_token_identifier.cdc

File renamed without changes.
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#set -e
33

44
# Constants
5-
AMM_SIGNER="amm"
5+
SIGNER="mock-incrementfi"
66

77
# Helper functions
88
echo_info() {
@@ -17,14 +17,14 @@ flow transactions send "./cadence/transactions/flow-token/transfer_flow.cdc" 0xf
1717

1818
# 2. Setup MOET and YIELD vault, and create swap pairs
1919
#
20-
MOET_IDENTIFIER=$(flow scripts execute ./cadence/scripts/mocks/amm/get_moet_token_identifier.cdc | grep "^Result:" | sed -E 's/Result: "([^"]+)"/\1/')
21-
YIELD_IDENTIFIER=$(flow scripts execute ./cadence/scripts/mocks/amm/get_yield_token_identifier.cdc | grep "^Result:" | sed -E 's/Result: "([^"]+)"/\1/')
20+
MOET_IDENTIFIER=$(flow scripts execute ./cadence/scripts/mocks/incrementfi/get_moet_token_identifier.cdc | grep "^Result:" | sed -E 's/Result: "([^"]+)"/\1/')
21+
YIELD_IDENTIFIER=$(flow scripts execute ./cadence/scripts/mocks/incrementfi/get_yield_token_identifier.cdc | grep "^Result:" | sed -E 's/Result: "([^"]+)"/\1/')
2222

23-
flow transactions send ./cadence/transactions/mocks/amm/setup.cdc --signer ${AMM_SIGNER}
23+
flow transactions send ./cadence/transactions/mocks/incrementfi/setup.cdc --signer ${SIGNER}
2424
#
2525
# 3. transfer funds to FLOW, MOET, and YIELD vaults
2626
#
27-
flow transactions send ./cadence/transactions/mocks/amm/transfer_amm_tokens.cdc f3fcd2c1a78f5eee 1000.0
27+
flow transactions send ./cadence/transactions/mocks/incrementfi/transfer_amm_tokens.cdc f3fcd2c1a78f5eee 1000.0
2828
#
2929
# 4. create swap pair
3030
#
@@ -52,7 +52,7 @@ flow transactions send "./lib/DeFiActions/cadence/transactions/increment-fi/add_
5252
/storage/moetTokenVault_0xf8d6e0586b0a20c7 \
5353
/storage/yieldTokenVault_0xf8d6e0586b0a20c7 \
5454
false \
55-
--signer $AMM_SIGNER
55+
--signer $SIGNER
5656
#
5757
# 6. add connectors
5858
#

0 commit comments

Comments
 (0)