Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 62 additions & 10 deletions .github/workflows/backend-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,72 @@ jobs:
run: pnpm --filter=@hallmaster/backend prisma:generate

- parallel:
- name: Run lint
run: pnpm --filter=@hallmaster/backend lint
- name: Run lint
run: pnpm --filter=@hallmaster/backend lint

- name: Run format check
run: pnpm --filter=@hallmaster/backend format:check
- name: Run format check
run: pnpm --filter=@hallmaster/backend format:check

- name: Test the build process
run: pnpm --filter=@hallmaster/backend build
- name: Test build process
run: pnpm --filter=@hallmaster/backend build

- name: Run the unit tests
run: pnpm --filter=@hallmaster/backend test:unit
test:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
include:
- branche: ${{ github.head_ref }}
artifact: pull-request
- branch: main
artifact: main
steps:
- name: Checkout repository
uses: actions/checkout@v7
with:
ref: ${{ matrix.branch }}

- name: Setup Node.js & pnpm
uses: pnpm/setup@v2
with:
cache: true
install: false

- name: Install dependencies
run: pnpm install --filter=@hallmaster/backend... --frozen-lockfile

- name: Run the integration tests
run: pnpm --filter=@hallmaster/backend test:integration
- name: Generate Prisma types
run: pnpm --filter=@hallmaster/backend prisma:generate

- name: Run tests
run: pnpm --filter=@hallmaster/backend test:coverage

- name: Upload coverage
uses: actions/upload-artifact@v7
with:
name: coverage-${{ matrix.artifact }}
path: coverage

report-coverage:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7

- name: Download coverage artifact
uses: actions/download-artifact@v8
with:
name: coverage-pull-request
path: coverage
- uses: actions/download-artifact@v8
with:
name: coverage-main
path: coverage-main

- name: Report coverage
uses: davelosert/vitest-coverage-report-action@v2
with:
json-summary-compare-path: coverage-main/coverage-summary.json

build-and-push:
name: Build and Push Images
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
"packageManager": {
"name": "pnpm",
"version": "12.6.0"
"version": "12.14.0"
}
},
"devDependencies": {
Expand Down
2 changes: 2 additions & 0 deletions packages/backend/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ export default defineConfig({
test: {
coverage: {
include: ["src/**/*.ts"],
reportOnFailure: true,
reporter: ["json-summary", "json"],
},
projects: [
{
Expand Down
122 changes: 61 additions & 61 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading