Skip to content

Update Font Awesome #982

Update Font Awesome

Update Font Awesome #982

name: CI-web-app
on:
push:
branches:
- dev
- main
paths:
- "apps/halprin-web-app/**"
- "packages/**"
- "package.json"
- "tsconfig.base.json"
- "yarn.lock"
- ".yarnrc.yml"
- ".github/workflows/**"
- ".eslintrc.base.json"
- ".eslintignore"
pull_request:
types:
- opened
- synchronize
- reopened
# Optional:
# Only consider those files/paths to trigger the github action
# to prevent unnecessary builds.
paths:
- "apps/halprin-web-app/**"
- "packages/**"
- "package.json"
- "tsconfig.base.json"
- "yarn.lock"
- ".yarnrc.yml"
- ".github/workflows/**"
- ".eslintrc.base.json"
- ".eslintignore"
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
# Why not using setup-node 2.2+ cache option (yet) ?
# see https://github.com/belgattitude/nextjs-monorepo-example/pull/369
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
- name: Restore yarn cache
uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: yarn-cache-folder-${{ hashFiles('**/yarn.lock', '.yarnrc.yml') }}
restore-keys: |
yarn-cache-folder-
# see https://github.com/vercel/next.js/pull/27362
- name: Restore nextjs build halprin-web-app from cache
uses: actions/cache@v2
with:
path: ${{ github.workspace }}/apps/halprin-web-app/.next/cache
key: ${{ runner.os }}-halprin-web-app-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('apps/halprin-web-app/src/**.[jt]sx?', 'apps/halprin-web-app/src/**.json') }}
restore-keys: |
${{ runner.os }}-halprin-web-app-${{ hashFiles('**/yarn.lock') }}-
- name: Install dependencies
run: |
yarn install --immutable
- name: Check for duplicate dependencies in lock file
run: |
yarn dedupe --check
#- name: Generate Prisma client
# working-directory: apps/web-app
# run: |
# yarn prisma generate
- name: Typecheck
working-directory: apps/halprin-web-app
run: |
yarn typecheck
- name: Linter
working-directory: apps/halprin-web-app
run: |
yarn lint
- name: Unit tests
working-directory: apps/halprin-web-app
run: |
yarn ci-test:unit
- name: Build web-app
working-directory: apps/halprin-web-app
run: |
yarn build
env:
NEXTJS_BUILD_TARGET: server
# Speed up build cause they are linted in a previous step
NEXTJS_IGNORE_ESLINT: 1
# Speed up build by not running sourcemap upload (not even dry-run)
# Disable sourcemaps will speed up ci
# be sure to disable it if you intent to use the build
# done in this step (i.e: deploy, docker....)
NEXT_DISABLE_SOURCEMAPS: 1
NEXT_TELEMETRY_DISABLED: 0
# Fully disable sentry registration here (no overhead in build time)
NEXT_DISABLE_SENTRY: 1
# Disable sentry source map upload (when not needed)
NEXT_SENTRY_DRY_RUN: 1
- name: Check bundle size
working-directory: apps/halprin-web-app
run: |
yarn bundle:check-size