50 lines
1.3 KiB
YAML
50 lines
1.3 KiB
YAML
name: lint-and-check
|
|
|
|
on: [ pull_request,push]
|
|
|
|
jobs:
|
|
prepare:
|
|
runs-on: ubuntu-latest
|
|
name: Prepare
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
- name: Setup Node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "20"
|
|
cache: ${{ steps.detect-package-manager.outputs.manager }}
|
|
- name: Enable Corepack
|
|
id: enable-corepack
|
|
run: |
|
|
corepack enable
|
|
- name: Restore cache
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
.next/cache
|
|
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-
|
|
- name: Install dependencies
|
|
run: yarn install
|
|
|
|
cli-check:
|
|
runs-on: ubuntu-latest
|
|
needs: prepare
|
|
name: CLI Check
|
|
steps:
|
|
- name: Lint
|
|
run: yarn cli lint
|
|
- name: Build
|
|
run: yarn cli build
|
|
|
|
component-check:
|
|
runs-on: ubuntu-latest
|
|
needs: prepare
|
|
name: Component Check
|
|
steps:
|
|
- name: Lint
|
|
run: yarn react lint
|
|
- name: TypeScript Compile
|
|
run: yarn react tsc |