Update probit initialization and descriptions #503
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: Playwright Tests | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
test: | |
timeout-minutes: 60 | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres:latest | |
env: | |
POSTGRES_DB: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_USER: postgres | |
ports: | |
- 5432:5432 | |
# Set health checks to wait until postgres has started | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Install dependencies | |
run: make install | |
- name: Run DB Migration | |
run: make run-migrations | |
env: | |
POSTGRES_PORT: 5432 | |
POSTGRES_HOST: localhost | |
POSTGRES_DATABASE: postgres | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
- name: Run DB seeder | |
run: make run-seeder | |
env: | |
POSTGRES_PORT: 5432 | |
POSTGRES_HOST: localhost | |
POSTGRES_DATABASE: postgres | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
- name: Wait for localhost:3000 to become available | |
run: | | |
make start-server & | |
echo "Waiting for localhost:3000 to become available..." | |
attempt=1 | |
max_attempts=3 | |
while [ $attempt -le $max_attempts ]; do | |
echo "Attempt $attempt of $max_attempts" | |
if $(curl --output /dev/null --silent --head --fail http://localhost:3000); then | |
echo "localhost:3000 is now available." | |
break | |
fi | |
attempt=$((attempt+1)) | |
sleep 5 | |
done | |
if [ $attempt -gt $max_attempts ]; then | |
echo "Failed to connect to localhost:3000 after $max_attempts attempts." | |
exit 1 | |
fi | |
env: | |
POSTGRES_PORT: 5432 | |
POSTGRES_HOST: localhost | |
POSTGRES_DATABASE: postgres | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
JWT_SECRET: 6b23439e8fee67c5da38b61b8779e9f41a5e3e36efe723c6299dd2111896def6 | |
ADMIN_PASSWORD: 123123 | |
- name: Install Playwright Browsers | |
run: npx playwright install --with-deps | |
working-directory: ./interface | |
- name: Run Playwright tests | |
run: npx playwright test --project='chromium' | |
working-directory: ./interface | |
env: | |
PUBLIC_HUFI_BACKEND_URL: "http://localhost:3000" | |
POSTGRES_PORT: 5432 | |
POSTGRES_HOST: localhost | |
POSTGRES_DATABASE: postgres | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
JWT_SECRET: 6b23439e8fee67c5da38b61b8779e9f41a5e3e36efe723c6299dd2111896def6 | |
ADMIN_PASSWORD: 123123 | |
- name: Upload Playwright test artifacts | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: playwright-report | |
path: ./interface/playwright-report/ | |
retention-days: 30 |