test-pipeline #3
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: test-pipeline | |
on: | |
workflow_dispatch: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
# Define the PostgreSQL service | |
services: | |
postgres: | |
image: postgres:15 | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: my_db | |
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 18 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Install Dependencies | |
run: | | |
npm install -g @nestjs/cli | |
npm install | |
- name: Build | |
run: npm run build | |
- name: Migrations | |
run: npx prisma migrate dev |