Skip to content

Commit

Permalink
fix: ci test
Browse files Browse the repository at this point in the history
  • Loading branch information
hemengke1997 committed Jan 16, 2024
1 parent 0d90cde commit 76151ee
Show file tree
Hide file tree
Showing 4 changed files with 594 additions and 390 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,19 @@ on:

jobs:
test:
timeout-minutes: 20
timeout-minutes: 10
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node_version: [16, 18, 20]
node_version: [18]
include:
# Active LTS + other OS
- os: macos-latest
node_version: 18
- os: windows-latest
node_version: 18
fail-fast: true
fail-fast: false

name: 'Build&Test: node-${{ matrix.node_version }}, ${{ matrix.os }}'

Expand All @@ -50,13 +50,14 @@ jobs:
version: 8.6.2

- name: Set node version to ${{ matrix.node_version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node_version }}
cache: pnpm
cache-dependency-path: '**/pnpm-lock.yaml'

- name: Install deps
run: pnpm install
run: pnpm install --frozen-lockfile --prefer-offline --ignore-scripts

# Install playwright's binary under custom directory to cache
- name: Set Playwright path (non-windows)
Expand All @@ -75,8 +76,7 @@ jobs:
path: ${{ env.PLAYWRIGHT_BROWSERS_PATH }}

- name: Install Playwright
# does not need to explicitly set chromium after https://github.com/microsoft/playwright/issues/14862 is solved
run: pnpx playwright install chromium
run: pnpx playwright@1.39.0 install chromium

- name: Build
run: pnpm run build
Expand Down
28 changes: 14 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "ts-template",
"version": "0.0.0",
"packageManager": "pnpm@8.10.5",
"description": "a template for typescript project or plugin",
"type": "module",
"keywords": [
Expand Down Expand Up @@ -31,39 +30,40 @@
"scripts": {
"dev": "simple-git-hooks && tsup --watch",
"build": "tsup",
"build:pages": "pnpm run build && cd playground/spa && pnpm run build",
"build:pages": "npm run build && cd playground/spa && npm run build",
"test": "run-s test:unit test:serve test:build",
"test:unit": "vitest run",
"test:serve": "vitest run -c vitest.config.e2e.ts",
"test:build": "cross-env VITE_TEST_BUILD=1 vitest run -c vitest.config.e2e.ts",
"commitlint": "commitlint --edit",
"lint": "eslint .",
"up": "taze -I -w -r",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0",
"bump": "bumpp package.json -c -p -t --all -x \"pnpm run changelog\""
"bump": "bumpp package.json -c -p -t --all -x \"npm run changelog\""
},
"devDependencies": {
"@commitlint/cli": "^18.4.1",
"@minko-fe/commitlint-config": "^2.0.5",
"@minko-fe/eslint-config": "^2.0.5",
"@minko-fe/tsconfig": "^2.0.5",
"bumpp": "^9.2.0",
"@commitlint/cli": "^18.4.4",
"@minko-fe/commitlint-config": "^2.0.7",
"@minko-fe/eslint-config": "^2.0.7",
"@minko-fe/tsconfig": "^2.0.7",
"bumpp": "^9.2.1",
"conventional-changelog-cli": "^4.1.0",
"cross-env": "^7.0.3",
"eslint": "8.53.0",
"npm-run-all": "^4.1.5",
"simple-git-hooks": "^2.9.0",
"taze": "^0.12.0",
"taze": "^0.12.3",
"tsup": "^7.2.0",
"typescript": "^5.2.2",
"vite": "^4.5.0",
"typescript": "^5.3.3",
"vite": "^4.5.1",
"vitest": "^0.34.6",
"vitest-e2e": "^0.0.8"
"vitest-e2e": "^0.0.10"
},
"engines": {
"node": ">=16.0.0"
},
"simple-git-hooks": {
"commit-msg": "pnpm exec commitlint -e",
"pre-commit": "pnpm run lint"
"commit-msg": "npm run commitlint",
"pre-commit": "npm run lint"
}
}
10 changes: 5 additions & 5 deletions playground/spa/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
"react-dom": "^18.2.0"
},
"devDependencies": {
"@types/react": "^18.2.37",
"@types/react-dom": "^18.2.15",
"@vitejs/plugin-react": "^4.1.1",
"typescript": "^5.2.2",
"vite": "^4.5.0"
"@types/react": "^18.2.48",
"@types/react-dom": "^18.2.18",
"@vitejs/plugin-react": "^4.2.1",
"typescript": "^5.3.3",
"vite": "^4.5.1"
}
}
Loading

0 comments on commit 76151ee

Please sign in to comment.