Skip to content

fix typo

fix typo #94

Workflow file for this run

name: E2E Tests
on:
push:
branches:
- main
- dev
jobs:
build:
runs-on: ubuntu-latest
env:
NODE_ENV: testing
TEST_DATABASE_URL: postgres://testuser:testpassword@localhost:5432/testdb
services:
postgres:
image: postgres:16
ports:
- 5432:5432
env:
POSTGRES_DB: testdb
POSTGRES_USER: testuser
POSTGRES_PASSWORD: testpassword
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '20'
- name: Verify Docker installation
run: docker --version
- name: List Docker containers
run: docker ps -a
- name: Install dependencies
run: npm ci
- name: Wait for PostgreSQL to be ready
run: |
until pg_isready -h localhost -p 5432 -U testuser; do
echo "Waiting for PostgreSQL..."
sleep 2
done
- name: Echo DATABASE_URL
run: echo $DATABASE_URL
- name: Run database migrations
run: npm run migrations
# env:
# NODE_ENV: testing
# DATABASE_URL: postgres://testuser:testpassword@localhost:5432/testdb
- name: Run unit tests
run: npm run test
- name: Run e2e tests
run: |
if [ "$RUNNER_OS" = "Windows" ]; then
set NODE_ENV=testing && npm run test:e2e
else
npm run test:e2e
fi