Skip to content

changed checkout and node.js version #68

changed checkout and node.js version

changed checkout and node.js version #68

Workflow file for this run

on:
push:
branches:
- main
- dev
jobs:
build:
runs-on: ubuntu-latest
container:
image: docker:latest
options: --privileged
services:
postgres:
image: postgres:latest
ports:
- 5432:5432
env:
POSTGRES_DB: testdb
POSTGRES_USER: testuser
POSTGRES_PASSWORD: testpassword
options: >-
--health-cmd="pg_isready -U $${POSTGRES_USER}"
--health-interval=10s
--health-timeout=5s
--health-retries=5
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
- 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: Run database migrations
run: npm run migrations
- name: Run unit tests
run: npm run test
- name: Run e2e tests
run: npm run test:e2e
env:
TEST_DATABASE_URL: postgres://testuser:testpassword@localhost:5432/testdb