From 2c11b5026a4ee5791893ffb97cd68a4598e30e3c Mon Sep 17 00:00:00 2001 From: Marc Mintel Date: Mon, 23 Feb 2026 02:00:48 +0100 Subject: [PATCH] chore(ci): Use Turborepo for CI pipeline QA caching --- .dockerignore | 10 ++++++ .gitea/workflows/ci.yml | 10 +++++- .gitea/workflows/deploy.yml | 14 +++++--- .gitignore | 9 +++++- package.json | 2 ++ pnpm-lock.yaml | 64 +++++++++++++++++++++++++++++++++++++ turbo.json | 20 ++++++++++++ 7 files changed, 122 insertions(+), 7 deletions(-) create mode 100644 turbo.json diff --git a/.dockerignore b/.dockerignore index 5fa65ce8..ffab86ac 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,5 +1,15 @@ node_modules .next +.DS_Store +.git +.gitignore +.gitea +.github +public/uploads +directus/uploads +.turbo +reference/ +.next !.next/cache .git .DS_Store diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index d0cf025e..90db18e1 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -46,8 +46,16 @@ jobs: env: NPM_TOKEN: ${{ secrets.REGISTRY_PASS }} + - name: Setup Turbo cache + uses: actions/cache@v4 + with: + path: .turbo + key: ${{ runner.os }}-turbo-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-turbo- + - name: ๐Ÿงช QA Checks - run: pnpm check:mdx && pnpm lint && pnpm typecheck && pnpm test + run: npx turbo run check:mdx lint typecheck test - name: ๐Ÿ—๏ธ Build run: pnpm build diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 75eb546c..936e27c6 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -171,15 +171,19 @@ jobs: echo "//${{ vars.REGISTRY_HOST || 'npm.infra.mintel.me' }}/:_authToken=${{ secrets.REGISTRY_PASS }}" >> .npmrc - name: Install dependencies run: pnpm install --frozen-lockfile + - name: Setup Turbo cache + uses: actions/cache@v4 + with: + path: .turbo + key: ${{ runner.os }}-turbo-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-turbo- + - name: ๐Ÿ”’ Security Audit run: pnpm audit --audit-level high - name: ๐Ÿงช QA Checks if: github.event.inputs.skip_checks != 'true' - run: | - pnpm lint - pnpm check:spell - pnpm typecheck - pnpm test + run: npx turbo run lint check:spell typecheck test # โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ # JOB 3: Build & Push diff --git a/.gitignore b/.gitignore index 96a18c21..b0930a3a 100644 --- a/.gitignore +++ b/.gitignore @@ -19,4 +19,11 @@ directus/uploads # Pa11y CI .pa11yci/ -.htmlvalidate-tmp \ No newline at end of file +.htmlvalidate-tmp + +# Turborepo +.turbo + +# Test Outputs +html-errors*.json +reference/ \ No newline at end of file diff --git a/package.json b/package.json index e3734ad6..374bdb32 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,7 @@ "name": "klz-cables-nextjs", "type": "module", "private": true, + "packageManager": "pnpm@10.18.3", "dependencies": { "@directus/sdk": "^21.0.0", "@mintel/mail": "1.8.3", @@ -79,6 +80,7 @@ "start-server-and-test": "^2.1.3", "tailwindcss": "^4.1.18", "tsx": "^4.21.0", + "turbo": "^2.8.10", "typescript": "^5.7.2", "vitest": "^4.0.16" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4b123c61..d9b76910 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -235,6 +235,9 @@ importers: tsx: specifier: ^4.21.0 version: 4.21.0 + turbo: + specifier: ^2.8.10 + version: 2.8.10 typescript: specifier: ^5.7.2 version: 5.9.3 @@ -7166,6 +7169,40 @@ packages: engines: {node: '>=18.0.0'} hasBin: true + turbo-darwin-64@2.8.10: + resolution: {integrity: sha512-A03fXh+B7S8mL3PbdhTd+0UsaGrhfyPkODvzBDpKRY7bbeac4MDFpJ7I+Slf2oSkCEeSvHKR7Z4U71uKRUfX7g==} + cpu: [x64] + os: [darwin] + + turbo-darwin-arm64@2.8.10: + resolution: {integrity: sha512-sidzowgWL3s5xCHLeqwC9M3s9M0i16W1nuQF3Mc7fPHpZ+YPohvcbVFBB2uoRRHYZg6yBnwD4gyUHKTeXfwtXA==} + cpu: [arm64] + os: [darwin] + + turbo-linux-64@2.8.10: + resolution: {integrity: sha512-YK9vcpL3TVtqonB021XwgaQhY9hJJbKKUhLv16osxV0HkcQASQWUqR56yMge7puh6nxU67rQlTq1b7ksR1T3KA==} + cpu: [x64] + os: [linux] + + turbo-linux-arm64@2.8.10: + resolution: {integrity: sha512-3+j2tL0sG95iBJTm+6J8/45JsETQABPqtFyYjVjBbi6eVGdtNTiBmHNKrbvXRlQ3ZbUG75bKLaSSDHSEEN+btQ==} + cpu: [arm64] + os: [linux] + + turbo-windows-64@2.8.10: + resolution: {integrity: sha512-hdeF5qmVY/NFgiucf8FW0CWJWtyT2QPm5mIsX0W1DXAVzqKVXGq+Zf+dg4EUngAFKjDzoBeN6ec2Fhajwfztkw==} + cpu: [x64] + os: [win32] + + turbo-windows-arm64@2.8.10: + resolution: {integrity: sha512-QGdr/Q8LWmj+ITMkSvfiz2glf0d7JG0oXVzGL3jxkGqiBI1zXFj20oqVY0qWi+112LO9SVrYdpHS0E/oGFrMbQ==} + cpu: [arm64] + os: [win32] + + turbo@2.8.10: + resolution: {integrity: sha512-OxbzDES66+x7nnKGg2MwBA1ypVsZoDTLHpeaP4giyiHSixbsiTaMyeJqbEyvBdp5Cm28fc+8GG6RdQtic0ijwQ==} + hasBin: true + type-check@0.4.0: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} @@ -15498,6 +15535,33 @@ snapshots: optionalDependencies: fsevents: 2.3.3 + turbo-darwin-64@2.8.10: + optional: true + + turbo-darwin-arm64@2.8.10: + optional: true + + turbo-linux-64@2.8.10: + optional: true + + turbo-linux-arm64@2.8.10: + optional: true + + turbo-windows-64@2.8.10: + optional: true + + turbo-windows-arm64@2.8.10: + optional: true + + turbo@2.8.10: + optionalDependencies: + turbo-darwin-64: 2.8.10 + turbo-darwin-arm64: 2.8.10 + turbo-linux-64: 2.8.10 + turbo-linux-arm64: 2.8.10 + turbo-windows-64: 2.8.10 + turbo-windows-arm64: 2.8.10 + type-check@0.4.0: dependencies: prelude-ls: 1.2.1 diff --git a/turbo.json b/turbo.json new file mode 100644 index 00000000..9eeb2b22 --- /dev/null +++ b/turbo.json @@ -0,0 +1,20 @@ +{ + "$schema": "https://turbo.build/schema.json", + "tasks": { + "lint": { + "outputs": [] + }, + "typecheck": { + "outputs": [] + }, + "test": { + "outputs": [] + }, + "check:spell": { + "outputs": [] + }, + "check:mdx": { + "outputs": [] + } + } +}