From aaba126a8a5000633cead15e4bb6675664ad08a1 Mon Sep 17 00:00:00 2001 From: 0xonramp <0xonramp@gmail.com> Date: Wed, 26 Jun 2024 13:30:55 -0400 Subject: [PATCH 1/3] feat: Semantic release --- .github/workflows/publish.yml | 33 ++++++++++++++++++++++++++------- .nvmrc | 1 + 2 files changed, 27 insertions(+), 7 deletions(-) create mode 100644 .nvmrc diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index b0466624..ce499eab 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -16,19 +16,19 @@ on: pull_request: types: [opened, reopened, synchronize] +permissions: + contents: write + issues: write + pull-requests: write + jobs: build: runs-on: ubuntu-latest - strategy: - matrix: - node-version: [18.x] - # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ steps: - uses: actions/checkout@v4 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 + - uses: actions/setup-node@v4 with: - node-version: ${{ matrix.node-version }} + node-version-file: '.nvmrc' cache: 'npm' - run: npm ci - run: npm run lint @@ -53,3 +53,22 @@ jobs: # run last - as it alters the block number # skip as it can't be minted or redeemed with 0x # - run: npm run test:eth2xfli + publish: + runs-on: ubuntu-latest + if: ${{ github.ref == 'refs/heads/main' }} + needs: [build] + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: actions/setup-node@v4 + with: + node-version-file: '.nvmrc' + cache: 'npm' + - run: npm ci + - run: npm run build + - name: Release + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: npx semantic-release --branches main diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 00000000..3c032078 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +18 From 8b9727a18d526eea24878620b01683d92fd88ffd Mon Sep 17 00:00:00 2001 From: JD Date: Thu, 27 Jun 2024 09:32:21 +0200 Subject: [PATCH 2/3] chore: update lockfile --- package-lock.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 06fdd947..28307911 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@indexcoop/flash-mint-sdk", - "version": "3.1.0", + "version": "3.3.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@indexcoop/flash-mint-sdk", - "version": "3.1.0", + "version": "3.3.0", "license": "MIT", "dependencies": { "@ethersproject/abstract-provider": "^5.6.1", From ad3a8b86aa2ade9d66a6e8162550459c10e9398e Mon Sep 17 00:00:00 2001 From: JD Date: Thu, 27 Jun 2024 09:42:37 +0200 Subject: [PATCH 3/3] test: skip hyeth tests due to low liq --- src/tests/hyeth.test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/tests/hyeth.test.ts b/src/tests/hyeth.test.ts index be78151b..cfd474bf 100644 --- a/src/tests/hyeth.test.ts +++ b/src/tests/hyeth.test.ts @@ -28,7 +28,7 @@ describe('hyETH', () => { await factory.executeTx() }) - test('can mint with ETH (large amout)', async () => { + test.skip('can mint with ETH (large amout)', async () => { await factory.fetchQuote({ isMinting: true, inputToken: eth, @@ -44,14 +44,14 @@ describe('hyETH', () => { isMinting: true, inputToken: usdc, outputToken: indexToken, - indexTokenAmount: wei('100'), + indexTokenAmount: wei('1'), slippage: 0.5, }) const whale = '0x7713974908Be4BEd47172370115e8b1219F4A5f0' await transferFromWhale( whale, factory.getSigner().address, - wei('1000000', quote.inputToken.decimals), + wei('100000', quote.inputToken.decimals), quote.inputToken.address, factory.getProvider() ) @@ -69,7 +69,7 @@ describe('hyETH', () => { await factory.executeTx() }) - test('can redeem to ETH (large amount)', async () => { + test.skip('can redeem to ETH (large amount)', async () => { await factory.fetchQuote({ isMinting: false, inputToken: indexToken,