44 lines
1.3 KiB
YAML
44 lines
1.3 KiB
YAML
name: End to end Tests
|
|
on:
|
|
push:
|
|
branches: [ main, master ]
|
|
pull_request:
|
|
branches: [ main, master ]
|
|
jobs:
|
|
test:
|
|
timeout-minutes: 10
|
|
defaults:
|
|
run:
|
|
working-directory: ./tests/end-to-end
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Set up cargo cache
|
|
uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: lts/*
|
|
cache: 'npm'
|
|
cache-dependency-path: ./tests/end-to-end/package-lock.json
|
|
- run: sudo apt-get update && sudo apt-get install -y unixodbc-dev
|
|
- run: npm ci && npx playwright install --with-deps chromium
|
|
- name: build sqlpage
|
|
run: cargo build
|
|
working-directory: ./examples/official-site
|
|
- name: start official site and wait for it to be ready
|
|
timeout-minutes: 1
|
|
run: |
|
|
cargo run 2>/tmp/stderrlog &
|
|
tail -f /tmp/stderrlog | grep -q "started successfully"
|
|
working-directory: ./examples/official-site
|
|
- name: Run Playwright tests
|
|
run: npx playwright test
|
|
- name: show server logs
|
|
if: failure()
|
|
run: cat /tmp/stderrlog
|
|
- uses: actions/upload-artifact@v4
|
|
if: always()
|
|
with:
|
|
name: playwright-report
|
|
path: ./tests/end-to-end/playwright-report/
|
|
retention-days: 30 |