From 9b9c6e31c82887159f256d52d24277af35cd342c Mon Sep 17 00:00:00 2001 From: Yue JIN Date: Mon, 12 Aug 2024 10:09:40 +0800 Subject: [PATCH] chore: update ci --- .github/workflows/ci.yml | 58 +++++++++++++++------------------------- netlify.toml | 7 ----- 2 files changed, 21 insertions(+), 44 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a8786b7..5517a39 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,11 +13,11 @@ jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: pnpm/action-setup@v2 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: pnpm/action-setup@v4 + - uses: actions/setup-node@v4 with: - node-version: 18.x + node-version: 20.x cache: pnpm - name: Install @@ -29,11 +29,11 @@ jobs: typecheck: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: pnpm/action-setup@v2 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: pnpm/action-setup@v4 + - uses: actions/setup-node@v4 with: - node-version: 18.x + node-version: 20.x cache: pnpm - name: Install @@ -47,20 +47,17 @@ jobs: strategy: matrix: - node-version: [18.x] + node-version: [20.x] os: [ubuntu-latest] fail-fast: false steps: - - uses: actions/checkout@v3 - - uses: pnpm/action-setup@v2 + - uses: actions/checkout@v4 + - uses: pnpm/action-setup@v4 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} - registry-url: https://registry.npmjs.org/ - cache: pnpm - - run: pnpm install - run: pnpm run test:unit @@ -69,36 +66,23 @@ jobs: strategy: matrix: - node-version: [18.x] + node-version: [20.x] os: [ubuntu-latest] fail-fast: false steps: - - uses: actions/checkout@v3 - - uses: actions/cache@v3 - with: - path: | - ~/.cache - key: cypress-cache-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }} - - - uses: pnpm/action-setup@v2 - - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - name: Install pnpm + uses: pnpm/action-setup@v4 + - name: Setup Node + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} - registry-url: https://registry.npmjs.org/ - cache: pnpm - - - run: pnpm install - - - name: Cypress PNPM Patch - run: cp pnpm-lock.yaml package-lock.json - + cache: 'pnpm' - name: Cypress - uses: cypress-io/github-action@v4 + uses: cypress-io/github-action@v6 with: - install-command: echo + install-command: pnpm install build: pnpm run build start: pnpm run preview record: true diff --git a/netlify.toml b/netlify.toml index 0422d21..2eef932 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,10 +1,3 @@ -[build.environment] - NODE_VERSION = "16" - -[build] - publish = "dist" - command = "pnpm run build" - [[redirects]] from = "/*" to = "/index.html"