Skip to content

ci: fix tag trigger

ci: fix tag trigger #8

Workflow file for this run

name: Test
on:
# run it on push to the default repository branch
push:
branches: [main, dev]
# run it during pull request
pull_request:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
test:
name: Run Tests
runs-on: ubuntu-latest
services:
postgres:
image: postgres:latest
env:
POSTGRES_USER: admin
POSTGRES_PASSWORD: 1234567890
POSTGRES_DB: celory
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v2
- name: Install dependencies
run: npm install
- name: Wait for PostgreSQL to be ready
run: |
until pg_isready -h localhost -p 5432; do
echo "Waiting for PostgreSQL to be ready..."
sleep 1
done
- name: Run tests
env:
DATABASE_URL: postgres://admin:1234567890@localhost:5432/celory
run: npm run test