feature: Adds CI workflows.
This commit is contained in:
parent
07c1f1ca1d
commit
8eeab0d6b4
2 changed files with 120 additions and 0 deletions
60
.github/workflows/api-testing.yml
vendored
Normal file
60
.github/workflows/api-testing.yml
vendored
Normal file
|
@ -0,0 +1,60 @@
|
||||||
|
name: CI Testing (API)
|
||||||
|
|
||||||
|
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
|
60
.github/workflows/lom-testing.yml
vendored
Normal file
60
.github/workflows/lom-testing.yml
vendored
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue