Skip to content

feat: Update NextJS to 14 #12

feat: Update NextJS to 14

feat: Update NextJS to 14 #12

Workflow file for this run

name: "Webapp"
on:
push:
branches: [ '**' ]
jobs:
build:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
node-version: [ 18, 20 ]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: ./.github/workflows/actions/setup
with:
node-version: ${{ matrix.node-version }}
- shell: bash
run: pnpm install
--include-workspace-root
--frozen-lockfile
--filter=app...
- name: Build
shell: bash
run: pnpm nx run app:build
test:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
node-version: [ 18, 20 ]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: ./.github/workflows/actions/setup
with:
node-version: ${{ matrix.node-version }}
- shell: bash
run: pnpm install
--include-workspace-root
--frozen-lockfile
--filter=app...
- name: "Lint"
shell: bash
run: pnpm nx run app:lint
- name: "Type check"
shell: bash
run: pnpm nx run app:type-check
- name: "Test"
shell: bash
run: pnpm nx run app:test --watchAll=false --maxWorkers=20% --coverage
- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master
if: env.SONAR_ORGANIZATION != ''
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_ORGANIZATION: ${{ vars.SONAR_ORGANIZATION }}
SONAR_WEBAPP_PROJECT_KEY: ${{ vars.SONAR_WEBAPP_PROJECT_KEY }}
with:
projectBaseDir: apps/app
test-lib:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
node-version: [ 18, 20 ]
webapp-lib-name:
- core
- api-client
- graphql-api
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: ./.github/workflows/actions/setup
with:
node-version: ${{ matrix.node-version }}
- shell: bash
run: pnpm install
--include-workspace-root
--frozen-lockfile
--filter=${{ matrix.webapp-lib-name }}...
- name: "${{ matrix.webapp-lib-name }}: Lint"
shell: bash
run: pnpm nx run ${{ matrix.webapp-lib-name }}:lint
- name: "${{ matrix.webapp-lib-name }}: Type check"
shell: bash
run: pnpm nx run ${{ matrix.webapp-lib-name }}:type-check
- name: "${{ matrix.webapp-lib-name }}: Test"
shell: bash
run: pnpm nx run ${{ matrix.webapp-lib-name }}:test --watchAll=false --maxWorkers=20% --coverage
- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master
if: env.SONAR_ORGANIZATION != ''
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_ORGANIZATION: ${{ vars.SONAR_ORGANIZATION }}
SONAR_WEBAPP_CORE_PROJECT_KEY: ${{ vars.SONAR_WEBAPP_CORE_PROJECT_KEY }}
SONAR_WEBAPP_API_CLIENT_PROJECT_KEY: ${{ vars.SONAR_WEBAPP_API_CLIENT_PROJECT_KEY }}
SONAR_WEBAPP_GRAPHQL_API_PROJECT_KEY: ${{ vars.SONAR_WEBAPP_CONTENTFUL_PROJECT_KEY }}
with:
projectBaseDir: "packages/${{ matrix.webapp-lib-name }}"