feature: Adds CI workflows.

This commit is contained in:
greysoh 2024-05-10 12:33:13 -04:00
parent 07c1f1ca1d
commit 8eeab0d6b4
Signed by: imterah
GPG key ID: 8FA7DD57BA6CEA37
2 changed files with 120 additions and 0 deletions

60
.github/workflows/lom-testing.yml vendored Normal file
View file

@ -0,0 +1,60 @@
name: CI Testing (LOM)
on:
pull_request:
paths:
- "api/**"
push:
paths:
- "api/**"
tags-ignore:
- "*"
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_USERNAME: nextnet
POSTGRES_PASSWORD: nextnet
POSTGRES_DB: nextnet
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- name: Checkout code using Git
uses: actions/checkout@main
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Install dependencies
working-directory: api
run: npm install --save-dev
- name: Install prisma
working-directory: api
run: npx prisma migrate dev
- name: Build source
working-directory: api
run: npm build
- name: Run eslint
working-directory: api
run: npx eslint src
- name: Run prettier to verify if we're formatted or not
uses: creyD/prettier_action@v4.3
with:
dry: true