Skip to content

Commit

Permalink
First public commit
Browse files Browse the repository at this point in the history
  • Loading branch information
lukevella committed Apr 12, 2022
0 parents commit e05cd62
Show file tree
Hide file tree
Showing 228 changed files with 17,717 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
.env
.sentryclirc
sentry.properties
3 changes: 3 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "next/core-web-vitals"
}
78 changes: 78 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: ci
on:
push:
branches:
- main
- development

jobs:
linting:
name: Linting
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v2

- name: Setup node
uses: actions/setup-node@v2
with:
node-version: 16
cache: yarn

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: ESLint
run: yarn lint

# Label of the container job
integration-tests:
name: Run tests
# Containers must run in Linux based operating systems
runs-on: ubuntu-latest

steps:
# Downloads a copy of the code in your repository before running CI tests
- name: Check out repository code
uses: actions/checkout@v2

- name: Setup node
uses: actions/setup-node@v2
with:
node-version: 16
cache: yarn

- name: Set environment variables
run: |
echo "DATABASE_URL=postgresql://postgres:password@localhost:5432/db" >> $GITHUB_ENV
- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Run db
run: |
docker pull postgres:14.2
docker run -d -p 5432:5432 -e POSTGRES_PASSWORD=password -e POSTGRES_DB=db postgres:14.2
yarn wait-on --timeout 60000 tcp:localhost:5432
- name: Build
run: yarn build

- name: Deploy migrations
run: yarn prisma migrate deploy

- name: Install playwright dependencies
run: yarn playwright install --with-deps chromium

- name: Launch app
run: yarn start 2>&1 & # backgrounnd mode

- name: Run tests
run: yarn test

- name: Upload artifact playwright-report
if: ${{ success() || failure() }}
uses: actions/upload-artifact@v2
with:
name: playwright-report
path: ./playwright-report
42 changes: 42 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# next.js
.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
.env
.env.local
.env.development.local
.env.test.local
.env.production.local

# vercel
.vercel

# Sentry
.sentryclirc

# playwright
/playwright-report
/test-results
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"semi": true,
"tabWidth": 2,
"useTabs": false,
"trailingComma": "all",
"singleQuote": false,
"arrowParens": "always"
}
6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"editor.codeActionsOnSave": {
"source.fixAll": true
},
"typescript.tsdk": "node_modules/typescript/lib"
}
22 changes: 22 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM node:alpine

RUN mkdir -p /usr/src/app
ENV PORT 3000
ARG DATABASE_URL
ENV DATABASE_URL $DATABASE_URL

WORKDIR /usr/src/app

COPY package.json /usr/src/app
COPY yarn.lock /usr/src/app
COPY schema.prisma /usr/src/app

RUN yarn --production

COPY . /usr/src/app

RUN yarn build

EXPOSE 3000

CMD [ "yarn", "start" ]
Loading

0 comments on commit e05cd62

Please sign in to comment.