-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from sammynave/sveltekit-2
Sveltekit 2
- Loading branch information
Showing
99 changed files
with
2,414 additions
and
1,191 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
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,20 @@ | ||
# Public | ||
PUBLIC_FAKTORY_URL=http://localhost:7420 | ||
|
||
# Private | ||
FAKTORY_URL=tcp://localhost:7419 | ||
FAKTORY_PASSWORD='' | ||
DATABASE_URL=postgres://postgres:password@localhost:5432/startup-testing | ||
SENDGRID_API_KEY='YOUR_API_KEY' | ||
REDIS_WS_SERVER=redis://:test-password@localhost:6379 | ||
REDIS_WS_PASSWORD=test-password | ||
|
||
# needed for docker initialization | ||
POSTGRES_USER=postgres | ||
POSTGRES_PASSWORD=password | ||
POSTGRES_DB=startup-testing | ||
|
||
# https://node.testcontainers.org/supported-container-runtimes/ | ||
# playwright workaround with colima | ||
NODE_OPTIONS=--dns-result-order=ipv4first | ||
|
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,83 @@ | ||
name: E2E Tests | ||
|
||
run-name: ${{github.actor}} e2e tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
Run-E2E-Tests: | ||
runs-on: ubuntu-latest | ||
services: | ||
# Label used to access the service container | ||
postgres: | ||
# Docker Hub image | ||
image: postgres | ||
# Provide the password for postgres | ||
# Set health checks to wait until postgres has started | ||
env: | ||
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: password | ||
POSTGRES_DB: startup | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
ports: | ||
# Maps tcp port 5432 on service container to the host | ||
- 5432:5432 | ||
redis: | ||
image: redis | ||
options: >- | ||
--health-cmd "redis-cli ping" | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
ports: | ||
# Maps tcp port 5432 on service container to the host | ||
- 6379:6379 | ||
env: | ||
PUBLIC_FAKTORY_URL: http://localhost:7420 | ||
FAKTORY_URL: tcp://localhost:7419 | ||
FAKTORY_PASSWORD: '' | ||
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: password | ||
POSTGRES_DB: startup | ||
DATABASE_URL: postgres://postgres:password@localhost:5432/startup | ||
# why does this work instead of localhost? | ||
REDIS_WS_SERVER: redis://:password@127.0.0.1:6379 | ||
REDIS_WS_PASSWORD: password | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8 | ||
- name: Install Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
cache: pnpm | ||
- name: Install deps | ||
run: pnpm install --frozen-lockfile | ||
- name: Playwright | ||
run: pnpx playwright install --with-deps | ||
- name: Migrate DATABASE_URL | ||
run: pnpm run db:migrate | ||
- name: Test | ||
run: pnpm run ci:integration | ||
- name: Upload results | ||
uses: actions/upload-artifact@v3 | ||
if: always() | ||
with: | ||
name: playwright-report | ||
path: playwright-report/ | ||
retention-days: 30 |
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,45 @@ | ||
name: Static Analysis | ||
|
||
run-name: ${{github.actor}} static analysis | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
Run-Lint: | ||
runs-on: ubuntu-latest | ||
env: | ||
PUBLIC_FAKTORY_URL: http://localhost:7420 | ||
FAKTORY_URL: tcp://localhost:7419 | ||
FAKTORY_PASSWORD: '' | ||
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: password | ||
POSTGRES_DB: startup | ||
DATABASE_URL: postgres://postgres:password@localhost:5432/startup | ||
# why does this work instead of localhost? | ||
REDIS_WS_SERVER: redis://:password@127.0.0.1:6379 | ||
REDIS_WS_PASSWORD: password | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8 | ||
- name: Install Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
cache: pnpm | ||
- name: Install deps | ||
run: pnpm install --frozen-lockfile | ||
- name: Lint | ||
run: pnpm run lint | ||
- name: Check Types | ||
run: pnpm run check |
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,32 @@ | ||
name: Unit Tests | ||
|
||
run-name: ${{github.actor}} unit tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
Run-Unit-Tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8 | ||
- name: Install Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
cache: pnpm | ||
- name: Install deps | ||
run: pnpm install --frozen-lockfile | ||
- name: Test | ||
run: pnpm run ci:unit |
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
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 |
---|---|---|
@@ -1,13 +1,13 @@ | ||
{ | ||
"$schema": "https://shadcn-svelte.com/schema.json", | ||
"style": "default", | ||
"tailwind": { | ||
"config": "tailwind.config.js", | ||
"css": "src/app.postcss", | ||
"baseColor": "slate" | ||
}, | ||
"aliases": { | ||
"components": "$lib/components", | ||
"utils": "$lib/utils" | ||
} | ||
} | ||
"$schema": "https://shadcn-svelte.com/schema.json", | ||
"style": "default", | ||
"tailwind": { | ||
"config": "tailwind.config.js", | ||
"css": "src/app.postcss", | ||
"baseColor": "slate" | ||
}, | ||
"aliases": { | ||
"components": "$lib/components", | ||
"utils": "$lib/utils" | ||
} | ||
} |
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 |
---|---|---|
|
@@ -64,4 +64,4 @@ async function startWorker() { | |
}); | ||
} | ||
|
||
startWorker(); | ||
startWorker(); |
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.