Skip to content

fix(deps): update nextjs monorepo to v16 (major) #602

fix(deps): update nextjs monorepo to v16 (major)

fix(deps): update nextjs monorepo to v16 (major) #602

Workflow file for this run

name: Continuous Integration
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
permissions:
contents: read
jobs:
check:
name: Check
runs-on: ubuntu-24.04
steps:
- name: πŸ›‘οΈ Harden the runner
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
with:
egress-policy: audit
- name: πŸ“¦ Checkout
if: github.event_name != 'pull_request'
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
with:
fetch-depth: 0
- name: πŸ“¦ Checkout
if: github.event_name == 'pull_request'
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: πŸ‡³ Setup Node.js
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6
with:
node-version: "24.11.0"
- name: πŸ’Ύ Cache Node.js modules
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
- name: βš’οΈ Setup just
uses: extractions/setup-just@e33e0265a09d6d736e2ee1e0eb685ef1de4669ff # v3
with:
just-version: "1.40.0"
- name: βš™οΈ Install dependencies
run: just ci
- name: πŸ“ Check lints and formatting
run: just check
test:
name: Test
runs-on: ubuntu-24.04
steps:
- name: πŸ›‘οΈ Harden the runner
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
with:
egress-policy: audit
- name: πŸ“¦ Checkout
if: github.event_name != 'pull_request'
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
with:
fetch-depth: 0
- name: πŸ“¦ Checkout
if: github.event_name == 'pull_request'
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: πŸ‡³ Setup Node.js
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6
with:
node-version: "24.11.0"
- name: πŸ’Ύ Cache Node.js modules
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
- name: βš’οΈ Setup just
uses: extractions/setup-just@e33e0265a09d6d736e2ee1e0eb685ef1de4669ff # v3
with:
just-version: "1.40.0"
- name: βš™οΈ Install dependencies
run: just ci
- name: πŸ§ͺ Run tests
run: just test
- name: ⬆️ Upload coverage report
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
with:
name: test-coverage
path: coverage/
build:
needs: [test, check]
name: Build
runs-on: ubuntu-24.04
steps:
- name: πŸ›‘οΈ Harden the runner
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
with:
egress-policy: audit
- name: πŸ“¦ Checkout
if: github.event_name != 'pull_request'
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
with:
fetch-depth: 0
- name: πŸ“¦ Checkout
if: github.event_name == 'pull_request'
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: πŸ‡³ Setup Node.js
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6
with:
node-version: "24.11.0"
- name: πŸ’Ύ Cache Node.js modules
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
- name: βš’οΈ Setup just
uses: extractions/setup-just@e33e0265a09d6d736e2ee1e0eb685ef1de4669ff # v3
with:
just-version: "1.40.0"
- name: βš™οΈ Install dependencies
run: just ci
- name: πŸ—οΈ Build production output
run: just build
- name: ⬆️ Upload static website artifact
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
with:
name: blog-${{ github.sha }}
path: dist/blog
test-e2e:
name: Test E2E (${{ matrix.browser }})
runs-on: ubuntu-24.04
needs: build
container:
image: mcr.microsoft.com/playwright:v1.56.1-noble@sha256:f1e7e01021efd65dd1a2c56064be399f3e4de00fd021ac561325f2bfbb2b837a
strategy:
fail-fast: false
matrix:
browser:
[
chromium,
firefox,
webkit,
mobile-chrome,
mobile-safari,
microsoft-edge,
google-chrome,
]
steps:
- name: πŸ›‘οΈ Harden the runner
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
with:
egress-policy: audit
- name: πŸ“¦ Checkout
if: github.event_name != 'pull_request'
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
with:
fetch-depth: 0
- name: πŸ“¦ Checkout
if: github.event_name == 'pull_request'
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: πŸ‡³ Setup Node.js
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6
with:
node-version: "24.11.0"
- name: πŸ’Ύ Cache Node.js modules
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
- name: βš’οΈ Setup just
uses: extractions/setup-just@e33e0265a09d6d736e2ee1e0eb685ef1de4669ff # v3
with:
just-version: "1.40.0"
- name: βš™οΈ Install dependencies
run: just ci
- name: πŸ’Ύ Cache Playwright browsers
id: cache-playwright-browsers
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: ~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-${{ hashFiles('**/playwright.config.ts') }}
restore-keys: |
${{ runner.os }}-playwright-
- name: βš™οΈ Setup Microsoft Edge
if: matrix.browser == 'microsoft-edge'
run: npx playwright install msedge
- name: βš™οΈ Setup Google Chrome
if: matrix.browser == 'google-chrome'
run: npx playwright install chrome
- name: ⬇️ Download generated distribution
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6
with:
name: blog-${{ github.sha }}
path: dist/blog
- name: πŸ§ͺ Run E2E tests
run: just test-e2e-on ${{ matrix.browser }}
env:
CI: "true"
HOME: /root
- name: ⬆️ Upload coverage report
if: matrix.browser == 'chromium'
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
with:
name: test-e2e-coverage-${{ matrix.browser }}
path: e2e-tests-report/coverage/ui-lcov.info
sonar:
needs: [test, test-e2e, check]
name: Sonar
runs-on: ubuntu-24.04
steps:
- name: πŸ›‘οΈ Harden the runner
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
with:
egress-policy: audit
- name: πŸ“¦ Checkout
if: github.event_name != 'pull_request'
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
with:
fetch-depth: 0
- name: πŸ“¦ Checkout
if: github.event_name == 'pull_request'
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: ⬇️ Download test coverage report
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6
with:
name: test-coverage
path: coverage/
- name: ⬇️ Download test-e2e coverage report
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6
with:
name: test-e2e-coverage-chromium
path: e2e-tests-report/coverage
- name: πŸ’Ύ Cache SonarCloud packages
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-sonar
- name: 🏷️ Get package version
id: get_version
run: echo "VERSION=$(grep '"version"' package.json | cut -d '"' -f 4)" >> $GITHUB_OUTPUT
- name: πŸ” SonarCloud Scan
uses: SonarSource/sonarqube-scan-action@fd88b7d7ccbaefd23d8f36f73b59db7a3d246602 # v6.0.0
with:
args: >
-Dsonar.scm.revision=${{ github.sha }}
-Dsonar.projectVersion=${{ steps.get_version.outputs.VERSION }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}