Barazo default frontend barazo.forum
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix(ci): restore CI optimizations lost during rebase (#166)

PR #153 rebase accidentally reverted ci.yml to pre-optimization state
due to inverted --ours/--theirs semantics during git rebase. This
restores all optimizations from PRs #150-#153:

- Job timeouts on all jobs
- Composite setup action (.github/actions/setup/)
- Lexicons build caching
- Next.js build cache (shared between build and accessibility)
- Job dependency graph (lint/typecheck/test -> build -> accessibility)
- Path filters for PRs (skip CI on docs-only changes)
- --prod flag on security audit

authored by

Guido X Jansen and committed by
GitHub
4d75e422 b6838a75

+48 -126
+48 -126
.github/workflows/ci.yml
··· 5 5 branches: [main, develop] 6 6 pull_request: 7 7 branches: [main, develop] 8 + paths: 9 + - 'src/**' 10 + - 'e2e/**' 11 + - 'public/**' 12 + - 'package.json' 13 + - 'pnpm-lock.yaml' 14 + - 'tsconfig.json' 15 + - 'vitest.config.ts' 16 + - 'next.config.ts' 17 + - 'tailwind.config.*' 18 + - 'playwright.config.ts' 19 + - 'lighthouserc.json' 20 + - '.github/workflows/ci.yml' 21 + - '.github/actions/**' 8 22 9 23 concurrency: 10 24 group: ${{ github.workflow }}-${{ github.ref }} ··· 17 31 lint: 18 32 name: Lint 19 33 runs-on: ubuntu-latest 34 + timeout-minutes: 10 20 35 steps: 21 - - name: Checkout 22 - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 23 - 24 - - name: Install pnpm 25 - uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4 26 - 27 - - name: Setup Node.js 28 - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 29 - with: 30 - node-version: '24' 31 - cache: 'pnpm' 32 - 33 - - name: Clone and build barazo-lexicons 34 - run: | 35 - git clone --depth 1 https://github.com/barazo-forum/barazo-lexicons.git ../barazo-lexicons 36 - cd ../barazo-lexicons && pnpm install --ignore-scripts && pnpm run build 37 - 38 - - name: Install dependencies 39 - run: pnpm install --frozen-lockfile 40 - 36 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 37 + - uses: ./.github/actions/setup 41 38 - name: Run ESLint 42 39 run: pnpm lint 43 - 44 40 - name: Check formatting 45 41 run: pnpm format:check 46 42 47 43 typecheck: 48 44 name: Type Check 49 45 runs-on: ubuntu-latest 46 + timeout-minutes: 10 50 47 steps: 51 - - name: Checkout 52 - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 53 - 54 - - name: Install pnpm 55 - uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4 56 - 57 - - name: Setup Node.js 58 - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 59 - with: 60 - node-version: '24' 61 - cache: 'pnpm' 62 - 63 - - name: Clone and build barazo-lexicons 64 - run: | 65 - git clone --depth 1 https://github.com/barazo-forum/barazo-lexicons.git ../barazo-lexicons 66 - cd ../barazo-lexicons && pnpm install --ignore-scripts && pnpm run build 67 - 68 - - name: Install dependencies 69 - run: pnpm install --frozen-lockfile 70 - 48 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 49 + - uses: ./.github/actions/setup 71 50 - name: Run TypeScript 72 51 run: pnpm typecheck 73 52 74 53 test: 75 54 name: Test 76 55 runs-on: ubuntu-latest 56 + timeout-minutes: 15 77 57 steps: 78 - - name: Checkout 79 - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 80 - 81 - - name: Install pnpm 82 - uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4 83 - 84 - - name: Setup Node.js 85 - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 86 - with: 87 - node-version: '24' 88 - cache: 'pnpm' 89 - 90 - - name: Clone and build barazo-lexicons 91 - run: | 92 - git clone --depth 1 https://github.com/barazo-forum/barazo-lexicons.git ../barazo-lexicons 93 - cd ../barazo-lexicons && pnpm install --ignore-scripts && pnpm run build 94 - 95 - - name: Install dependencies 96 - run: pnpm install --frozen-lockfile 97 - 58 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 59 + - uses: ./.github/actions/setup 98 60 - name: Run tests 99 61 run: pnpm test 100 62 101 63 build: 102 64 name: Build 103 65 runs-on: ubuntu-latest 66 + timeout-minutes: 20 104 67 needs: [lint, typecheck, test] 105 68 steps: 106 - - name: Checkout 107 - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 69 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 70 + - uses: ./.github/actions/setup 108 71 109 - - name: Install pnpm 110 - uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4 111 - 112 - - name: Setup Node.js 113 - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 72 + - name: Cache Next.js build 73 + uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3 114 74 with: 115 - node-version: '24' 116 - cache: 'pnpm' 117 - 118 - - name: Clone and build barazo-lexicons 119 - run: | 120 - git clone --depth 1 https://github.com/barazo-forum/barazo-lexicons.git ../barazo-lexicons 121 - cd ../barazo-lexicons && pnpm install --ignore-scripts && pnpm run build 122 - 123 - - name: Install dependencies 124 - run: pnpm install --frozen-lockfile 75 + path: .next/cache 76 + key: nextjs-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}-${{ hashFiles('src/**', 'public/**', 'next.config.ts') }} 77 + restore-keys: | 78 + nextjs-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}- 79 + nextjs-${{ runner.os }}- 125 80 126 81 - name: Build application 127 82 run: pnpm build 128 - 129 - - name: Upload build artifacts 130 - uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 131 - with: 132 - name: build 133 - path: | 134 - .next/standalone/ 135 - .next/static/ 136 - retention-days: 7 137 83 138 84 accessibility: 139 85 name: Accessibility Audit 140 86 runs-on: ubuntu-latest 87 + timeout-minutes: 30 141 88 needs: build 142 89 steps: 143 - - name: Checkout 144 - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 90 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 91 + - uses: ./.github/actions/setup 145 92 146 - - name: Install pnpm 147 - uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4 93 + - name: Install Playwright browsers 94 + run: pnpm exec playwright install --with-deps chromium 148 95 149 - - name: Setup Node.js 150 - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 96 + - name: Cache Next.js build 97 + uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3 151 98 with: 152 - node-version: '24' 153 - cache: 'pnpm' 154 - 155 - - name: Clone and build barazo-lexicons 156 - run: | 157 - git clone --depth 1 https://github.com/barazo-forum/barazo-lexicons.git ../barazo-lexicons 158 - cd ../barazo-lexicons && pnpm install --ignore-scripts && pnpm run build 159 - 160 - - name: Install dependencies 161 - run: pnpm install --frozen-lockfile 162 - 163 - - name: Install Playwright browsers 164 - run: pnpm exec playwright install --with-deps chromium 99 + path: .next/cache 100 + key: nextjs-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}-${{ hashFiles('src/**', 'public/**', 'next.config.ts') }} 101 + restore-keys: | 102 + nextjs-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}- 103 + nextjs-${{ runner.os }}- 165 104 166 105 - name: Build application 167 106 run: pnpm build ··· 214 153 security: 215 154 name: Security Scan 216 155 runs-on: ubuntu-latest 156 + timeout-minutes: 10 217 157 steps: 218 - - name: Checkout 219 - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 220 - 221 - - name: Install pnpm 222 - uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4 223 - 224 - - name: Setup Node.js 225 - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 226 - with: 227 - node-version: '24' 228 - cache: 'pnpm' 229 - 230 - - name: Clone and build barazo-lexicons 231 - run: | 232 - git clone --depth 1 https://github.com/barazo-forum/barazo-lexicons.git ../barazo-lexicons 233 - cd ../barazo-lexicons && pnpm install --ignore-scripts && pnpm run build 234 - 235 - - name: Install dependencies 236 - run: pnpm install --frozen-lockfile 237 - 158 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 159 + - uses: ./.github/actions/setup 238 160 - name: Security audit with retry 239 161 run: | 240 162 for attempt in 1 2 3; do