fix: fix ci #51
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI-next-demo | |
on: | |
push: | |
branches: | |
- dev | |
- main | |
# Only consider those paths to trigger the action | |
paths: | |
- 'packages/**' | |
- 'package.json' | |
- '*.lock' | |
- '.yarnrc.yml' | |
- 'tsconfig.base.json' | |
- '.prettier*' | |
- '.github/**' | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
- reopened | |
# Only consider those paths to trigger the action | |
paths: | |
- 'packages/**' | |
- 'package.json' | |
- '*.lock' | |
- '.yarnrc.yml' | |
- 'tsconfig.base.json' | |
- '.prettier*' | |
- '.github/**' | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18.x] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: 📥 Monorepo install | |
uses: ./.github/actions/yarn-nm-install | |
# see https://github.com/vercel/next.js/pull/27362 | |
- name: Restore nextjs build next-demo from cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
${{ github.workspace }}/packages/next-demo/.next/cache | |
${{ github.workspace }}/.cache | |
${{ github.workspace }}/**/tsconfig.tsbuildinfo | |
key: ${{ runner.os }}-next-demo-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('packages/next-demo/src/**.[jt]sx?', 'packages/next-demo/src/**.json') }} | |
restore-keys: | | |
${{ runner.os }}-next-demo-${{ hashFiles('**/yarn.lock') }}- | |
- name: Generate typings | |
working-directory: packages/next-demo | |
run: | | |
yarn generate | |
# - name: Typecheck | |
# working-directory: packages/next-demo | |
# run: | | |
# yarn typecheck | |
# - name: Linter | |
# working-directory: packages/next-demo | |
# run: | | |
# yarn lint | |
# env: | |
# DATABASE_URL: postgres://postgres:postgres@localhost:5432/postgres | |
# - name: Unit tests | |
# working-directory: packages/next-demo | |
# run: | | |
# yarn test-unit | |
# - name: Build web-app | |
# working-directory: packages/next-demo | |
# run: | | |
# yarn build | |
# env: | |
# # Speed up build: they are linted in a previous step | |
# NEXTJS_IGNORE_ESLINT: true | |
# DATABASE_URL: postgres://postgres:postgres@localhost:5432/postgres | |
# - name: Check browser bundle size limits | |
# working-directory: packages/next-demo | |
# run: | | |
# yarn check-size | |
# - name: Check ecmascript checks for build files | |
# working-directory: packages/next-demo | |
# run: | | |
# yarn check-dist |