Skip to content

📖 Flask Component Library #589

📖 Flask Component Library

📖 Flask Component Library #589

Workflow file for this run

name: Frontend Playwright Tests
on:
push:
branches: [ main, master ]
pull_request:
branches: "*"
jobs:
build_and_test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8","3.9","3.10", "3.11"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Set Branch Name
run: |
echo "branch_name=${GITHUB_HEAD_REF##*/}" >> $GITHUB_ENV
- name: Check Branch
run: echo "$env.branch_name"
- name: Get Hash
id: hash
run: echo "git_hash=$(git rev-parse --short "$GITHUB_SHA")" >> $GITHUB_ENV
- name: Check Hash
run: echo "$env.git_hash"
- name: Setup Build Env
run: |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
. ~/.nvm/nvm.sh
nvm install 14.15.3
nvm use 14.15.3
npm install --global yarn
- name: Build Extension in Dev Mode
run: |
pip install -e .
- name: Build Wheel
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade build &&
python -m build
- name: Install Xircuits from wheel
run: |
whl_name=$(echo dist/*whl)
pip install $whl_name
- name: Install Xircuits Test Component Library
run: |
xircuits-submodules tests
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
run: npm ci
- name: Setup Playwright
run: |
npx playwright install --with-deps
- name: Install xvfb
run: |
sudo apt-get install xvfb
- name: Test E2E
run: |
( ls && jupyter lab --ServerApp.token= --ServerApp.password= --LabApp.default_url=/lab\?reset ) & npm install -D @playwright/test && cd ui-tests && xvfb-run npx playwright test e2e/datatype-test.spec.ts
- uses: actions/upload-artifact@v3
if: failure()
with:
name: playwright-report-${{ matrix.python-version }}
path: ui-tests/playwright-report/
retention-days: 1