Skip to content

Commit

Permalink
ci: performance optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
GaoNeng-wWw committed Sep 28, 2024
1 parent d0cf188 commit 8214532
Showing 1 changed file with 27 additions and 44 deletions.
71 changes: 27 additions & 44 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ on:
name: "Test"

jobs:
unit-test:

install-deps:
runs-on: ubuntu-latest
name: Unit Test
name: Install Dependencies
steps:
- name: Checkout Repository
uses: actions/checkout@v4
Expand All @@ -22,63 +23,45 @@ jobs:
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- run: pnpm test

unit-test:
needs: install-deps
runs-on: ubuntu-latest
name: Unit Test
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Run Unit Tests
run: pnpm test

type-test:
needs: install-deps
runs-on: ubuntu-latest
name: Type Test
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 9
run_install: false
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- run: pnpm test:type
- name: Run Type Tests
run: pnpm test:type

build-dryrun:
needs: install-deps
runs-on: ubuntu-latest
name: Build DryRun
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 9
run_install: false
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- run: pnpm build
- name: Build Project
run: pnpm build

pub-dryrun:
needs: install-deps
runs-on: ubuntu-latest
name: Publish Dry run
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 9
run_install: false
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- run: pnpm build
- run: pnpm publish -r --dry-run --access=public --no-git-checks

- name: Build Project
run: pnpm build
- name: Publish Dry Run
run: pnpm publish -r --dry-run --access=public --no-git-checks

0 comments on commit 8214532

Please sign in to comment.