Skip to content

Fix naming problems around Wasp's tests #19

Fix naming problems around Wasp's tests

Fix naming problems around Wasp's tests #19

name: Run e2e tests on example apps
on:
workflow_call:
push:
paths:
- "examples/**"
branches:
- main
- release
pull_request:
paths:
- "examples/**"
env:
WASP_TELEMETRY_DISABLE: 1
jobs:
test-example-apps:
name: Test Example Apps
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
example:
- tutorials/TodoApp
- tutorials/TodoAppTs
- waspello
- waspleau
- websockets-realtime-voting
include:
- example: waspello
wasp-ts: true
steps:
- uses: "actions/checkout@v4"
- uses: ./.github/actions/setup-haskell
with:
ghc-version: "8.10.7"
cabal-version: "3.10.2.0"
cabal-project-dir: waspc
- uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install Wasp CLI
working-directory: waspc
run: |
./run install
- name: Install dependencies for ${{ matrix.example }}
working-directory: examples/${{ matrix.example }}
run: |
npm ci
npx playwright install --with-deps
if [ -f ".env.server.headless" ]; then
cp .env.server.headless .env.server
fi
- name: Setup Wasp TS support
run: wasp-cli ts-setup
working-directory: examples/${{ matrix.example }}
if: matrix.wasp-ts == true
- name: Extract Database Provider
id: extract-db-provider
working-directory: examples/${{ matrix.example }}
run: |
DATABASE_PROVIDER=$($GITHUB_WORKSPACE/scripts/get-wasp-database-provider.sh wasp-cli)
echo "provider=$DATABASE_PROVIDER" >> $GITHUB_OUTPUT
- name: Run e2e DEV tests for ${{ matrix.example }}
working-directory: examples/${{ matrix.example }}
env:
WASP_CLI_CMD: wasp-cli
WASP_RUN_MODE: dev
run: |
npm run test
- name: Run e2e BUILD tests for ${{ matrix.example }}
# Skip BUILD tests for SQLite projects, as it is not supported by Wasp
if: steps.extract-db-provider.outputs.provider != 'sqlite'
working-directory: examples/${{ matrix.example }}
env:
WASP_CLI_CMD: wasp-cli
WASP_RUN_MODE: build
run: |
npm run test