Skip to content

Commit

Permalink
chore: add ci
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentHardouin committed Sep 25, 2024
1 parent 4d4a7ab commit c9819fb
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: CI

on:
push:
branches: [main]
pull_request:

jobs:
ci:
runs-on: ubuntu-latest

services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20

- name: Install
run: npm ci

- name: Lint
run: npm run lint

- name: Test
run: npm test
env:
NODE_ENV: test
TEST_DATABASE_URL: postgres://postgres:postgres@localhost:5432/test

Check failure on line 44 in .github/workflows/ci.yml

View workflow job for this annotation

GitHub Actions / ci

Newline required at end of file but not found
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
"author": "",
"license": "AGPL-3.0",
"keywords": [],
"engines": {
"node": ">=20.0.0"
},
"main": "index.js",

Check failure on line 12 in package.json

View workflow job for this annotation

GitHub Actions / ci

Expected object keys to be in specified order. 'main' should be before 'engines'
"scripts": {
"db:new-migration": "npx knex --knexfile ./db/knexfile.js migrate:make $migrationname",
Expand Down

0 comments on commit c9819fb

Please sign in to comment.