Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanteixeira committed Jun 26, 2024
0 parents commit e46274d
Show file tree
Hide file tree
Showing 87 changed files with 20,752 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .env.local.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
CLIENT_ID=YourTwitchClientID
CLIENT_SECRET=YourTwitchClientSecret
NEXT_PUBLIC_BASE_URL=http://localhost:3000
# Set this if you want to point to a different DB file (like when running e2e tests)
# SQLITE_DB_FILENAME=sqlite_test.db
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", "prettier"]
}
80 changes: 80 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: CI

on:
push:
branches: [main]

jobs:
build:
name: Build
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'

- name: Install dependencies
run: npm install

- name: Build
run: npm run build

unit_tests:
name: Unit tests
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'

- name: Install dependencies
run: npm install

- name: Run unit tests
run: npm run test:coverage

- name: Upload Jest coverage report
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: coverage
retention-days: 5

e2e_tests:
name: End-to-end tests
needs: [build, unit_tests]
runs-on: ubuntu-latest
timeout-minutes: 10
env:
CLIENT_ID: ${{ secrets.CLIENT_ID }}
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
NEXT_PUBLIC_BASE_URL: http://localhost:3000
SQLITE_DB_FILENAME: sqlite_test.db
FORCE_COLOR: 2
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'

- name: Install dependencies
run: npm install

- name: Install chromium
run: npx playwright install chromium

- name: Build
run: npm run build

- name: Start app and run e2e tests
run: npx playwright test
28 changes: 28 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/.next/
/build
logs
/node_modules
/out/
coverage/
playwright-report/
reports/

.DS_Store
*.pem
.env*.local
*.tsbuildinfo
next-env.d.ts
npm-debug.log*

pids
*.pid
*.seed
*.pid.lock

grouvee*.csv
/drizzle/
sqlite.db
/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v20.13.1
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/.next
/drizzle
/node_modules
npm-debug.log*
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"trailingComma": "es5",
"semi": false,
"tabWidth": 2,
"singleQuote": true,
"jsxSingleQuote": false,
"plugins": ["prettier-plugin-tailwindcss"]
}
1 change: 1 addition & 0 deletions FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ko_fi: stefanteixeira
Loading

0 comments on commit e46274d

Please sign in to comment.