-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
Showing
12 changed files
with
936 additions
and
43 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,44 @@ | ||
name: Node.js CI | ||
|
||
on: | ||
push: | ||
branches: ['main'] | ||
pull_request: | ||
branches: ['main'] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
container: node:10.18-jessie | ||
services: | ||
postgres: | ||
image: postgres:13-alpine | ||
|
||
env: | ||
POSTGRES_PASSWORD: postgres | ||
POSTGRES_DB: thestack | ||
# Set health checks to wait until postgres has started | ||
options: >- | ||
--health-cmd pg_isready --health-interval 10s --health-timeout 5s | ||
--health-retries 5 | ||
strategy: | ||
matrix: | ||
node-version: [16.x] | ||
env: | ||
# these could also come from env variables of the actions if you wish for them to | ||
DATABASE_URL: 'postgresql://postgres:postgres@postgres:5432/tillwhen?schema=public' | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8.3.1 | ||
|
||
- run: pnpm install --frozen-lockfile | ||
# TODO: Enable after you have defined migrations in your codebase using prisma | ||
# - run: pnpx prisma migrate deploy | ||
- run: pnpm test:ci |
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
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,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npx lint-staged |
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
Oops, something went wrong.