Updated ci.yml to new version and removed FUNDING
Some checks failed
CI / Lint & Typecheck (push) Successful in 3m49s
CI / Test (routes) (push) Successful in 1m43s
CI / Test (security) (push) Successful in 1m52s
CI / Test (services) (push) Successful in 1m25s
CI / Test (unit) (push) Successful in 2m0s
CI / Test (integration) (push) Successful in 3m42s
CI / Test Coverage (push) Failing after 2m13s
CI / Build (push) Has been skipped

This commit is contained in:
2025-12-17 13:05:36 +13:00
parent 67a639d3bc
commit 1cbee42faa
2 changed files with 32 additions and 168 deletions

View File

@@ -6,42 +6,22 @@ on:
pull_request: pull_request:
types: [opened, synchronize] types: [opened, synchronize]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs: jobs:
lint-and-typecheck: lint-and-typecheck:
name: Lint & Typecheck name: Lint & Typecheck
runs-on: ubuntu-latest runs-on: ubuntu-latest
container:
image: node:22-bookworm
timeout-minutes: 10 timeout-minutes: 10
env: env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ vars.TURBO_TEAM }} TURBO_TEAM: ${{ vars.TURBO_TEAM }}
steps: steps:
- name: Checkout - uses: actions/checkout@v4
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Setup pnpm - name: Enable pnpm
uses: pnpm/action-setup@v4 run: corepack enable
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'pnpm'
- name: Cache Turborepo
uses: actions/cache@v4
with:
path: .turbo
key: ${{ runner.os }}-turbo-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-turbo-${{ hashFiles('**/pnpm-lock.yaml') }}-
${{ runner.os }}-turbo-
- name: Install dependencies - name: Install dependencies
run: pnpm install --frozen-lockfile run: pnpm install --frozen-lockfile
@@ -55,6 +35,8 @@ jobs:
test: test:
name: Test (${{ matrix.group }}) name: Test (${{ matrix.group }})
runs-on: ubuntu-latest runs-on: ubuntu-latest
container:
image: node:22-bookworm
timeout-minutes: 15 timeout-minutes: 15
env: env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
@@ -66,28 +48,10 @@ jobs:
group: [unit, services, routes, security] group: [unit, services, routes, security]
steps: steps:
- name: Checkout - uses: actions/checkout@v4
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Setup pnpm - name: Enable pnpm
uses: pnpm/action-setup@v4 run: corepack enable
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'pnpm'
- name: Cache Turborepo
uses: actions/cache@v4
with:
path: .turbo
key: ${{ runner.os }}-turbo-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-turbo-${{ hashFiles('**/pnpm-lock.yaml') }}-
${{ runner.os }}-turbo-
- name: Install dependencies - name: Install dependencies
run: pnpm install --frozen-lockfile run: pnpm install --frozen-lockfile
@@ -98,22 +62,21 @@ jobs:
- name: Run ${{ matrix.group }} tests - name: Run ${{ matrix.group }} tests
run: pnpm --filter @tracearr/server test:${{ matrix.group }} run: pnpm --filter @tracearr/server test:${{ matrix.group }}
# Integration tests require real database - run separately from unit tests
test-integration: test-integration:
name: Test (integration) name: Test (integration)
runs-on: ubuntu-latest runs-on: ubuntu-latest
container:
image: node:22-bookworm
timeout-minutes: 15 timeout-minutes: 15
env: env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ vars.TURBO_TEAM }} TURBO_TEAM: ${{ vars.TURBO_TEAM }}
TEST_DATABASE_URL: postgresql://test:test@localhost:5433/tracearr_test TEST_DATABASE_URL: postgresql://test:test@timescale:5432/tracearr_test
TEST_REDIS_URL: redis://localhost:6380 TEST_REDIS_URL: redis://redis:6379
services: services:
timescale: timescale:
image: timescale/timescaledb:latest-pg15 image: timescale/timescaledb:latest-pg15
ports:
- 5433:5432
env: env:
POSTGRES_USER: test POSTGRES_USER: test
POSTGRES_PASSWORD: test POSTGRES_PASSWORD: test
@@ -126,8 +89,6 @@ jobs:
redis: redis:
image: redis:7-alpine image: redis:7-alpine
ports:
- 6380:6379
options: >- options: >-
--health-cmd "redis-cli ping" --health-cmd "redis-cli ping"
--health-interval 5s --health-interval 5s
@@ -135,28 +96,10 @@ jobs:
--health-retries 5 --health-retries 5
steps: steps:
- name: Checkout - uses: actions/checkout@v4
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Setup pnpm - name: Enable pnpm
uses: pnpm/action-setup@v4 run: corepack enable
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'pnpm'
- name: Cache Turborepo
uses: actions/cache@v4
with:
path: .turbo
key: ${{ runner.os }}-turbo-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-turbo-${{ hashFiles('**/pnpm-lock.yaml') }}-
${{ runner.os }}-turbo-
- name: Install dependencies - name: Install dependencies
run: pnpm install --frozen-lockfile run: pnpm install --frozen-lockfile
@@ -167,39 +110,21 @@ jobs:
- name: Run integration tests - name: Run integration tests
run: pnpm --filter @tracearr/server test:integration run: pnpm --filter @tracearr/server test:integration
# Separate job for coverage reporting (runs all tests together for accurate coverage)
# Runs in parallel with test matrix - if tests pass there, coverage will too
test-coverage: test-coverage:
name: Test Coverage name: Test Coverage
runs-on: ubuntu-latest runs-on: ubuntu-latest
container:
image: node:22-bookworm
timeout-minutes: 15 timeout-minutes: 15
env: env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ vars.TURBO_TEAM }} TURBO_TEAM: ${{ vars.TURBO_TEAM }}
steps: steps:
- name: Checkout - uses: actions/checkout@v4
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Setup pnpm - name: Enable pnpm
uses: pnpm/action-setup@v4 run: corepack enable
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'pnpm'
- name: Cache Turborepo
uses: actions/cache@v4
with:
path: .turbo
key: ${{ runner.os }}-turbo-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-turbo-${{ hashFiles('**/pnpm-lock.yaml') }}-
${{ runner.os }}-turbo-
- name: Install dependencies - name: Install dependencies
run: pnpm install --frozen-lockfile run: pnpm install --frozen-lockfile
@@ -219,45 +144,26 @@ jobs:
retention-days: 7 retention-days: 7
if-no-files-found: warn if-no-files-found: warn
- name: Report coverage to PR
if: github.event_name == 'pull_request'
uses: davelosert/vitest-coverage-report-action@v2
with:
working-directory: apps/server
vite-config-path: vitest.config.ts
build: build:
name: Build name: Build
runs-on: ubuntu-latest runs-on: ubuntu-latest
container:
image: node:22-bookworm
timeout-minutes: 15 timeout-minutes: 15
needs: [lint-and-typecheck, test, test-integration, test-coverage] needs:
- lint-and-typecheck
- test
- test-integration
- test-coverage
env: env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ vars.TURBO_TEAM }} TURBO_TEAM: ${{ vars.TURBO_TEAM }}
steps: steps:
- name: Checkout - uses: actions/checkout@v4
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Setup pnpm - name: Enable pnpm
uses: pnpm/action-setup@v4 run: corepack enable
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'pnpm'
- name: Cache Turborepo
uses: actions/cache@v4
with:
path: .turbo
key: ${{ runner.os }}-turbo-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-turbo-${{ hashFiles('**/pnpm-lock.yaml') }}-
${{ runner.os }}-turbo-
- name: Install dependencies - name: Install dependencies
run: pnpm install --frozen-lockfile run: pnpm install --frozen-lockfile

View File

@@ -1,42 +0,0 @@
name: CI
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '22'
- name: Install pnpm
run: npm install -g pnpm
- name: Install dependencies
run: pnpm install
- name: Run lint (optional)
run: pnpm lint
- name: Run tests
run: pnpm test
docker-build:
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build Docker images
run: docker compose -f docker/docker-compose.yml build