Update CI scripts
This commit is contained in:
parent
347c7ccf36
commit
b7ed60cd47
|
@ -1,37 +1,28 @@
|
||||||
name: Test
|
name: Lint
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
pull_request:
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
lint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
FORCE_COLOR: 2
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout the repository
|
- uses: actions/checkout@v4
|
||||||
uses: actions/checkout@v3
|
- uses: pnpm/action-setup@v2
|
||||||
- name: Install pnpm
|
|
||||||
uses: pnpm/action-setup@v2
|
|
||||||
with:
|
with:
|
||||||
version: latest
|
version: latest
|
||||||
- name: Install Node.js
|
- uses: actions/setup-node@v4
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
with:
|
||||||
node-version: 18
|
node-version: 20
|
||||||
cache: pnpm
|
cache: pnpm
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm install --ignore-scripts
|
run: pnpm install --ignore-scripts
|
||||||
- name: Lint
|
- name: Lint
|
||||||
run: pnpm lint
|
run: pnpm lint
|
||||||
env:
|
|
||||||
FORCE_COLOR: 2
|
|
||||||
- name: Build
|
|
||||||
run: pnpm build
|
|
||||||
env:
|
|
||||||
FORCE_COLOR: 2
|
|
||||||
- name: Check size
|
|
||||||
uses: getsentry/size-limit-action@v5
|
|
||||||
with:
|
|
||||||
main_branch: main
|
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
skip_step: build
|
|
||||||
|
|
|
@ -0,0 +1,31 @@
|
||||||
|
name: Size Limit
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
pull-requests: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
size:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
CI_JOB_NUMBER: 1
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: pnpm/action-setup@v2
|
||||||
|
with:
|
||||||
|
version: latest
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 20
|
||||||
|
cache: pnpm
|
||||||
|
- name: Install dependencies
|
||||||
|
run: pnpm install --ignore-scripts
|
||||||
|
- name: Check size
|
||||||
|
uses: getsentry/size-limit-action@v6
|
||||||
|
with:
|
||||||
|
main_branch: main
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
Loading…
Reference in New Issue