diff --git a/.github/workflows/console-test-run.yml b/.github/workflows/console-test-run.yml index 28211ac59..84a27447c 100644 --- a/.github/workflows/console-test-run.yml +++ b/.github/workflows/console-test-run.yml @@ -1,5 +1,8 @@ name: (CI) Console tests +env: + VEGA_VERSION: v0.72.14 + on: workflow_call: inputs: @@ -11,7 +14,7 @@ jobs: run-tests: name: run-tests runs-on: console-test - timeout-minutes: 20 + timeout-minutes: 40 steps: #---------------------------------------------- # check-out frontend-monorepo @@ -67,23 +70,39 @@ jobs: repository: vegaprotocol/console-test path: './console-test' #---------------------------------------------- - # install dependencies if cache does not exist + # install dependencies #---------------------------------------------- - name: Install dependencies working-directory: ./console-test - if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' run: poetry install --no-interaction --no-root #---------------------------------------------- - # install vega binaries + # find vega binaries path + #---------------------------------------------- + - name: Find vega binaries path + id: vega_bin_path + working-directory: ./console-test + run: echo path=$(poetry run python -c "import vega_sim; print(vega_sim.vega_bin_path)") >> $GITHUB_OUTPUT + #---------------------------------------------- + # vega binaries cache + #---------------------------------------------- + - name: Vega binaries cache + uses: actions/cache@v3 + id: vega_binaries_cache + with: + path: ${{ steps.vega_bin_path.outputs.path }} + key: ${{ runner.os }}-vega-binaries-${{ env.VEGA_VERSION }} + #---------------------------------------------- + # install vega binaries #---------------------------------------------- - name: Install vega binaries working-directory: ./console-test - run: poetry run python -m vega_sim.tools.load_binaries --force + if: steps.vega_binaries_cache.outputs.cache-hit != 'true' + run: poetry run python -m vega_sim.tools.load_binaries --force --version $VEGA_VERSION #---------------------------------------------- # install playwright #---------------------------------------------- - name: install playwright - run: poetry run playwright install + run: poetry run playwright install --with-deps chromium working-directory: ./console-test #---------------------------------------------- # run tests diff --git a/.github/workflows/publish-dist.yml b/.github/workflows/publish-dist.yml index 07d65c602..8ac8886cf 100644 --- a/.github/workflows/publish-dist.yml +++ b/.github/workflows/publish-dist.yml @@ -155,10 +155,10 @@ jobs: - name: Sanity check docker image run: | echo "Check ipfs-hash" - docker run --rm --entrypoint /bin/sh ghcr.io/vegaprotocol/frontend/${{ matrix.app }}:local cat /ipfs-hash - docker run --rm --entrypoint /bin/sh ghcr.io/vegaprotocol/frontend/${{ matrix.app }}:local cat /ipfs-hash > ${{ matrix.app }}-ipfs-hash + docker run --rm --entrypoint /bin/sh ghcr.io/vegaprotocol/frontend/${{ matrix.app }}:local -c 'cat /ipfs-hash' + docker run --rm --entrypoint /bin/sh ghcr.io/vegaprotocol/frontend/${{ matrix.app }}:local -c 'cat /ipfs-hash' > ${{ matrix.app }}-ipfs-hash echo "List html directory" - docker run --rm --entrypoint /bin/sh ghcr.io/vegaprotocol/frontend/${{ matrix.app }}:local sh -c 'apk add --update tree; tree /usr/share/nginx/html' + docker run --rm --entrypoint /bin/sh ghcr.io/vegaprotocol/frontend/${{ matrix.app }}:local -c 'apk add --update tree; tree /usr/share/nginx/html' - name: Publish dist as docker image (ghcr) uses: docker/build-push-action@v3 diff --git a/apps/trading-e2e/src/integration/trading-deal-ticket-order.cy.ts b/apps/trading-e2e/src/integration/trading-deal-ticket-order.cy.ts index d2bd1c0d6..ac6be028d 100644 --- a/apps/trading-e2e/src/integration/trading-deal-ticket-order.cy.ts +++ b/apps/trading-e2e/src/integration/trading-deal-ticket-order.cy.ts @@ -24,9 +24,7 @@ describe('deal ticker order validation', { tags: '@smoke' }, () => { beforeEach(() => { cy.mockTradingPage(); - cy.getByTestId('deal-ticket-fee-margin-required').within(() => { - cy.get('button').click(); - }); + cy.getByTestId('deal-ticket-fee-margin-required').click(); }); describe('limit order', () => { @@ -111,6 +109,7 @@ describe('deal ticker order validation', { tags: '@smoke' }, () => { 'Total margin available100.01 tDAI' ); }); + cy.getByTestId('deal-ticket-fee-margin-required').click(); }); it('must have current margin allocation', () => { @@ -120,6 +119,7 @@ describe('deal ticker order validation', { tags: '@smoke' }, () => { 'Current margin allocation' ); }); + cy.getByTestId('deal-ticket-fee-margin-required').click(); }); it('should open usage breakdown dialog when clicked on current margin allocation', () => { @@ -128,6 +128,7 @@ describe('deal ticker order validation', { tags: '@smoke' }, () => { }); cy.getByTestId('usage-breakdown').should('exist'); cy.getByTestId('dialog-close').click(); + cy.getByTestId('deal-ticket-fee-margin-required').click(); }); }); }); diff --git a/apps/trading-e2e/src/integration/trading-trades.cy.ts b/apps/trading-e2e/src/integration/trading-trades.cy.ts index 50ad89f99..47518fbca 100644 --- a/apps/trading-e2e/src/integration/trading-trades.cy.ts +++ b/apps/trading-e2e/src/integration/trading-trades.cy.ts @@ -86,8 +86,8 @@ describe('trades', { tags: '@smoke' }, () => { }); it('copy price to deal ticket form', () => { - cy.getByTestId('Order').click(); // 6005-THIS-007 + cy.getByTestId('order-type-Limit').click(); cy.get(colIdPrice).last().should('be.visible').click(); cy.getByTestId('order-price').should('have.value', '171.16898'); }); diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 0bc9d09e0..c0ccf08a9 100755 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -1,11 +1,14 @@ #!/bin/sh -daemon="${1:-nginx}" +entrypoint="${1:-nginx}" -if [[ "$daemon" = "nginx" ]]; then +if [[ "$entrypoint" = "nginx" ]]; then nginx -g 'daemon off;' -elif [[ "$daemon" = "ipfs" ]]; then +elif [[ "$entrypoint" = "ipfs" ]]; then ipfs config profile apply server ipfs config --json Addresses.Gateway '"/ip4/127.0.0.1/tcp/80"' ipfs daemon +elif [[ "-c" ]]; then + shift + /bin/sh -c "$@" fi