feat(trading): run console-test on CICD (#4271)
This commit is contained in:
parent
6a55319e04
commit
61e7450906
8
.github/workflows/ci-cd-trigger.yml
vendored
8
.github/workflows/ci-cd-trigger.yml
vendored
@ -277,6 +277,14 @@ jobs:
|
|||||||
* trading: ${{ needs.lint-test-build.outputs.preview_trading }}
|
* trading: ${{ needs.lint-test-build.outputs.preview_trading }}
|
||||||
* tools: ${{ needs.lint-test-build.outputs.preview_tools }}
|
* tools: ${{ needs.lint-test-build.outputs.preview_tools }}
|
||||||
|
|
||||||
|
console-test:
|
||||||
|
needs: dist-check
|
||||||
|
name: '(CI) console-test'
|
||||||
|
uses: ./.github/workflows/console-test-run.yml
|
||||||
|
secrets: inherit
|
||||||
|
with:
|
||||||
|
github-sha: ${{ github.sha }}
|
||||||
|
|
||||||
# Report single result at the end, to avoid mess with required checks in PR
|
# Report single result at the end, to avoid mess with required checks in PR
|
||||||
cypress-check:
|
cypress-check:
|
||||||
name: '(CI) cypress - check'
|
name: '(CI) cypress - check'
|
||||||
|
59
.github/workflows/console-test-run.yml
vendored
Normal file
59
.github/workflows/console-test-run.yml
vendored
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
name: console-test-run
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
github-sha:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
jobs:
|
||||||
|
console-test:
|
||||||
|
timeout-minutes: 5
|
||||||
|
runs-on: self-hosted-runner
|
||||||
|
steps:
|
||||||
|
- name: Checkout console test repo
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
repository: vegaprotocol/console-test
|
||||||
|
path: './console-test'
|
||||||
|
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v4
|
||||||
|
with:
|
||||||
|
python-version: '3.10.11'
|
||||||
|
|
||||||
|
- name: Install Poetry
|
||||||
|
uses: snok/install-poetry@v1
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
poetry install --no-root
|
||||||
|
working-directory: ./console-test
|
||||||
|
|
||||||
|
- name: load Binaries
|
||||||
|
run: |
|
||||||
|
poetry run python -m vega_sim.tools.load_binaries
|
||||||
|
working-directory: ./console-test
|
||||||
|
|
||||||
|
- name: pull console
|
||||||
|
run: |
|
||||||
|
poetry run docker pull ghcr.io/vegaprotocol/frontend/trading:${{ inputs.github-sha }}
|
||||||
|
|
||||||
|
- name: Update container_name in config.py
|
||||||
|
run: |
|
||||||
|
sed -i "s/container_name = \".*\"/container_name = \"vegaprotocol\/frontend\/trading:${{ inputs.github-sha }}\"/g" config.py
|
||||||
|
|
||||||
|
- name: install playwright
|
||||||
|
run: poetry run playwright install
|
||||||
|
working-directory: ./console-test
|
||||||
|
|
||||||
|
- name: run tests
|
||||||
|
run: poetry run pytest --numprocesses auto
|
||||||
|
working-directory: ./console-test
|
||||||
|
|
||||||
|
- name: Upload Playwright Trace
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
if: always()
|
||||||
|
with:
|
||||||
|
name: playwright-trace
|
||||||
|
path: ./traces/
|
||||||
|
retention-days: 15
|
Loading…
Reference in New Issue
Block a user