Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/MomenNano/api-template into…
Browse files Browse the repository at this point in the history
… main
  • Loading branch information
MomenNano committed Aug 2, 2022
2 parents 7b7827d + e54a55c commit 5a52c92
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: CI

on:
push:
paths-ignore:
- '*.md'

pull_request:
paths-ignore:
- '*.md'

env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}

jobs:
test:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: create .env file
run: npm run create:env

- name: Start containers
env:
POSTGRES_USER: ${{ secrets.POSTGRES_USER }}
POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }}
POSTGRES_DB: ${{ secrets.POSTGRES_DB }}
run: npm run redis:up && npm run db:up

- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 16

- name: Install Dependencies
run: npm install --ignore-scripts

- name: Prisma generate
run: npx prisma generate

- name: Run Tests
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
run: npm run test:unit

0 comments on commit 5a52c92

Please sign in to comment.