Skip to content

Commit

Permalink
chore(workflow): fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
chenjiahan committed Jun 6, 2024
1 parent 129f73b commit fa4ec54
Show file tree
Hide file tree
Showing 3 changed files with 443 additions and 28 deletions.
74 changes: 51 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,65 @@ name: 'ci'
on: [push, pull_request]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: bahmutov/npm-install@v1
- name: Run lint
run: pnpm run lint
style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: bahmutov/npm-install@v1
- name: Run code style lint
run: pnpm run style
# lint:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2

# - name: Install Pnpm
# run: corepack enable

# - name: Setup Node.js 18.x
# uses: actions/setup-node@v4
# with:
# node-version: 18.x
# cache: 'pnpm'

# - name: Install Dependencies
# run: pnpm i

# - name: Run lint
# run: pnpm run lint

test:
runs-on: ubuntu-latest
strategy:
matrix:
node: ['16']
node: ['18']
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- uses: bahmutov/npm-install@v1
- name: Install Pnpm
run: corepack enable

- name: Setup Node.js 18.x
uses: actions/setup-node@v4
with:
node-version: 18.x
cache: 'pnpm'

- name: Install Dependencies
run: pnpm i
- name: Run unit tests
run: pnpm run test
test-types:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: bahmutov/npm-install@v1
- name: Run type declaration tests
run: pnpm run test:types

# test-types:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - name: Install Pnpm
# run: corepack enable

# - name: Setup Node.js 18.x
# uses: actions/setup-node@v4
# with:
# node-version: 18.x
# cache: 'pnpm'

# - name: Install Dependencies
# run: pnpm i

# - name: Run type declaration tests
# run: pnpm run test:types
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"enhanced-resolve": "^5.8.2",
"jest": "^27.0.0",
"prettier": "^2.0.5",
"typescript": "^4.0.0"
"typescript": "^4.0.0",
"webpack": "^5.91.0"
}
}
Loading

0 comments on commit fa4ec54

Please sign in to comment.