Skip to content

Commit

Permalink
chore: update ci
Browse files Browse the repository at this point in the history
  • Loading branch information
kingyue737 committed Aug 12, 2024
1 parent a9e64c6 commit 9b9c6e3
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 44 deletions.
58 changes: 21 additions & 37 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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

Expand All @@ -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
Expand Down
7 changes: 0 additions & 7 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
[build.environment]
NODE_VERSION = "16"

[build]
publish = "dist"
command = "pnpm run build"

[[redirects]]
from = "/*"
to = "/index.html"
Expand Down

0 comments on commit 9b9c6e3

Please sign in to comment.