-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e73099f
commit d087537
Showing
1 changed file
with
55 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
services: | ||
postgres: | ||
image: postgres:17.2 | ||
env: | ||
POSTGRES_DB: dashboard | ||
POSTGRES_USER: openjs | ||
POSTGRES_PASSWORD: password | ||
ports: | ||
- 5432:5432 | ||
options: >- | ||
--health-cmd="pg_isready -U openjs" | ||
--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@v3 | ||
with: | ||
node-version: '22' | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Lint files | ||
run: npm run lint | ||
|
||
- name: Run migrations | ||
run: npm run db:migrate | ||
|
||
- name: Seed database | ||
run: npm run db:seed | ||
|
||
- name: Run tests | ||
run: npm test | ||
|
||
- name: Stop infrastructure | ||
run: npm run infra:stop |