feat: add ui source #47
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Web UI | |
on: | |
pull_request: | |
jobs: | |
test: | |
name: Web UI Test | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- name: Echo Go Version | |
run: go version | |
- name: Install Yarn | |
run: npm install -g yarn | |
- name: Build UI and Start Server | |
env: | |
HOST: 0.0.0.0 | |
PORT: 8000 | |
run: | | |
make build-ui | |
make run & | |
- name: Wait for server to start | |
run: | | |
while ! curl -s http://localhost:8000 > /dev/null 2>&1; do | |
sleep 1 | |
done | |
- name: Setup npm | |
run: npm init -y | |
- name: Install Playwright | |
run: npm install @playwright/test | |
- name: Install Playwright Browsers | |
run: npx playwright install chromium --with-deps | |
- name: Run Playwright tests | |
run: npx playwright test | |