60 lines
1.6 KiB
YAML
60 lines
1.6 KiB
YAML
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
|