-
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.
- Loading branch information
1 parent
804e7ae
commit 2a758af
Showing
8 changed files
with
1,396 additions
and
30 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,85 @@ | ||
name: CI | ||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
paths-ignore: | ||
- '.github/**' | ||
- '!.github/workflows/ci.yaml' | ||
- '.gitignore' | ||
- '**.md' | ||
|
||
push: | ||
branches: | ||
- main | ||
- release@* | ||
paths-ignore: | ||
- '.github/**' | ||
- '!.github/workflows/ci.yaml' | ||
- '.gitignore' | ||
- '**.md' | ||
|
||
concurrency: | ||
# Documentation suggests ${{ github.head_ref }}, but that's only available on pull_request/pull_request_target triggers, so using ${{ github.ref }}. | ||
# On main, we want all builds to complete even if merging happens faster to make it easier to discover at which point something broke. | ||
group: ci-${{ github.ref_name == 'main' && format('ci-main-{0}', github.sha) || format('ci-{0}', github.ref) }} | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
contents: read | ||
id-token: write | ||
|
||
jobs: | ||
code-style: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 15 | ||
steps: | ||
- name: Check Out | ||
uses: actions/checkout@v4 | ||
|
||
- name: Use Node.js 20 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Enable corepack | ||
run: | | ||
corepack enable | ||
corepack prepare pnpm@latest --activate | ||
- name: Install deps | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Run Code Style Check | ||
run: pnpm run lint | ||
|
||
tests: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 25 | ||
steps: | ||
- name: Check Out | ||
uses: actions/checkout@v4 | ||
|
||
- name: Use Node.js 20 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Enable corepack | ||
run: | | ||
corepack enable | ||
corepack prepare pnpm@latest --activate | ||
- name: Install deps | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Start Docker Compose Services | ||
shell: bash | ||
run: | | ||
docker compose up -d --no-build --no-deps --quiet-pull --wait | ||
- name: Run Test Suite | ||
run: pnpm run test |
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,15 @@ | ||
services: | ||
database: | ||
image: postgres | ||
restart: always | ||
environment: | ||
POSTGRES_USER: ${DATABASE_USER:-lucia} | ||
POSTGRES_PASSWORD: ${DATABASE_PASSWORD:-lucia} | ||
POSTGRES_DB: ${DATABASE_NAME:-lucia} | ||
ports: | ||
- "5432:5432" | ||
volumes: | ||
- database:/var/lib/postgresql/data - | ||
volumes: | ||
database: | ||
driver: local |
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.