From 39fdbe6a6096e0499f611a87dfe0570ef977888b Mon Sep 17 00:00:00 2001 From: Lee ByeongJun Date: Thu, 8 Aug 2024 15:48:13 +0900 Subject: [PATCH 1/2] feat: gnoswap run test action --- .github/workflows/run_test.yml | 54 ++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .github/workflows/run_test.yml diff --git a/.github/workflows/run_test.yml b/.github/workflows/run_test.yml new file mode 100644 index 00000000..3dcaa626 --- /dev/null +++ b/.github/workflows/run_test.yml @@ -0,0 +1,54 @@ +name: GnoSwap Test Workflow + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - name: Checkout GnoSwap repository + uses: actions/checkout@v2 + with: + repository: gnoswap-labs/gnoswap + path: gnoswap + + - name: Checkout Gno repository + uses: actions/checkout@v2 + with: + repository: gnolang/gno + path: gno + + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: '1.20' + + - name: Install Gno + run: | + cd gno + make install + echo "${HOME}/go/bin" >> $GITHUB_PATH + + - name: Copy GnoSwap files to Gno repository + run: | + mkdir -p gno/examples/gno.land/r/demo + mkdir -p gno/examples/gno.land/r/gnoswap/v2 + mkdir -p gno/examples/gno.land/p/gnoswap + cp -R gnoswap/__local/grc20_tokens/* gno/examples/gno.land/r/demo + cp -R gnoswap/_deploy/r/gnoswap gno/examples/gno.land/r + cp -R gnoswap/_deploy/p/gnoswap gno/examples/gno.land/p/gnoswap + cp -R gnoswap/_deploy/r/gnoswap gno/examples/gno.land/r/gnoswap/v2 + cp -R gnoswap/pool gnoswap/position gnoswap/router gnoswap/staker gno/examples/gno.land/r/gnoswap/v2 + + # - name: Run Go tests + # working-directory: gno + # run: go test -v ./... + + - name: Run Gno tests + working-directory: gno + run: gno test -v ./examples/gno.land/r/gnoswap/v2/... From aacf8563ed60e6ab234d4ad06171eff8b2146e73 Mon Sep 17 00:00:00 2001 From: Lee ByeongJun Date: Thu, 8 Aug 2024 15:53:23 +0900 Subject: [PATCH 2/2] fix --- .github/workflows/run_test.yml | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/.github/workflows/run_test.yml b/.github/workflows/run_test.yml index 3dcaa626..fe74d2ff 100644 --- a/.github/workflows/run_test.yml +++ b/.github/workflows/run_test.yml @@ -14,13 +14,12 @@ jobs: - name: Checkout GnoSwap repository uses: actions/checkout@v2 with: - repository: gnoswap-labs/gnoswap path: gnoswap - - name: Checkout Gno repository + - name: Checkout Gno Core repository uses: actions/checkout@v2 with: - repository: gnolang/gno + repository: gnoswap-labs/gno path: gno - name: Set up Go @@ -28,12 +27,6 @@ jobs: with: go-version: '1.20' - - name: Install Gno - run: | - cd gno - make install - echo "${HOME}/go/bin" >> $GITHUB_PATH - - name: Copy GnoSwap files to Gno repository run: | mkdir -p gno/examples/gno.land/r/demo @@ -45,10 +38,11 @@ jobs: cp -R gnoswap/_deploy/r/gnoswap gno/examples/gno.land/r/gnoswap/v2 cp -R gnoswap/pool gnoswap/position gnoswap/router gnoswap/staker gno/examples/gno.land/r/gnoswap/v2 - # - name: Run Go tests - # working-directory: gno - # run: go test -v ./... + - name: Install Gno + run: | + cd gno + make install - name: Run Gno tests working-directory: gno - run: gno test -v ./examples/gno.land/r/gnoswap/v2/... + run: gno run -v ./... \ No newline at end of file