From 639561e723eb53acd1f4dc0bcea0600e724d9e10 Mon Sep 17 00:00:00 2001 From: Dev Ojha Date: Mon, 24 Oct 2022 09:07:09 -0700 Subject: [PATCH 1/2] Delete failing step --- .github/workflows/test.yml | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cfbcdf553db..b4f5b3cf6ad 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,27 +12,7 @@ on: workflow_dispatch: jobs: - should_run_go_test: - runs-on: ubuntu-latest - outputs: - should_skip: ${{ steps.skip_check.outputs.should_skip }} - steps: - - - id: skip_check - uses: fkirc/skip-duplicate-actions@master - with: - cancel_others: "true" # workflow-runs from outdated commits will be cancelled. - concurrent_skipping: "same_content" - skip_after_successful_duplicate: "true" - paths: '["**/*.go", "**/*.mod", "**/*.sum"]' - do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]' - - - name: Skipping test - run: echo Should I skip tests? ${{ steps.skip_check.outputs.should_skip }} - go: - needs: should_run_go_test - if: ${{ needs.should_run_test.outputs.should_skip != 'true' }} runs-on: ubuntu-latest steps: - From 6832912ff6927b40e39ddf26506f4efe41363bb2 Mon Sep 17 00:00:00 2001 From: Dev Ojha Date: Mon, 24 Oct 2022 10:08:11 -0700 Subject: [PATCH 2/2] Fix int overflow in test logic --- x/gamm/pool-models/stableswap/amm_test.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/x/gamm/pool-models/stableswap/amm_test.go b/x/gamm/pool-models/stableswap/amm_test.go index a186242e070..e40fb63665c 100644 --- a/x/gamm/pool-models/stableswap/amm_test.go +++ b/x/gamm/pool-models/stableswap/amm_test.go @@ -483,13 +483,12 @@ func TestCFMMInvariantMultiAssetsDirect(t *testing.T) { t.Run(name, func(t *testing.T) { // system under test sut := func() { - uReserve := calcUReserve(test.remReserves) wSumSquares := calcWSumSquares(test.remReserves) // using multi-asset cfmm - k2 := cfmmConstantMulti(test.xReserve, test.yReserve, uReserve, wSumSquares) + k2 := cfmmConstantMultiNoV(test.xReserve, test.yReserve, wSumSquares) xOut2 := solveCFMMMultiDirect(test.xReserve, test.yReserve, wSumSquares, test.yIn) - k3 := cfmmConstantMulti(test.xReserve.Sub(xOut2), test.yReserve.Add(test.yIn), uReserve, wSumSquares) + k3 := cfmmConstantMultiNoV(test.xReserve.Sub(xOut2), test.yReserve.Add(test.yIn), wSumSquares) osmomath.DecApproxEq(t, k2, k3, kErrTolerance) }