Skip to content

Commit

Permalink
chore: workflow npm only
Browse files Browse the repository at this point in the history
  • Loading branch information
zojize committed Jun 20, 2024
1 parent 53265df commit aa86b40
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 54 deletions.
45 changes: 10 additions & 35 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,73 +15,48 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v3

- name: Set node
uses: actions/setup-node@v4
with:
node-version: lts/*

- name: Setup
run: npm i -g @antfu/ni

- name: Install
run: nci
run: npm ci

- name: Lint
run: nr lint
run: npm run lint

typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v3

- name: Set node
uses: actions/setup-node@v4
with:
node-version: lts/*

- name: Setup
run: npm i -g @antfu/ni

- name: Install
run: nci
run: npm ci

- name: Typecheck
run: nr typecheck
run: npm run typecheck

test:
runs-on: ${{ matrix.os }}

strategy:
matrix:
node: [lts/*]
os: [ubuntu-latest, windows-latest, macos-latest]
fail-fast: false

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v3

- name: Set node ${{ matrix.node }}
- name: Set node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}

- name: Setup
run: npm i -g @antfu/ni
node-version: lts/*

- name: Install
run: nci
run: npm ci

- name: Build
run: nr build
run: npm run build

- name: Test
run: nr test
run: npm run test
11 changes: 1 addition & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,6 @@
"bugs": "https://github.com/illinois/autograding-telemetry/issues",
"keywords": [],
"main": "./dist/index.cjs",
"typesVersions": {
"*": {
"*": [
"./dist/*",
"./dist/index.d.ts"
]
}
},
"files": [
"dist"
],
Expand All @@ -39,7 +31,6 @@
},
"devDependencies": {
"@antfu/eslint-config": "^2.18.1",
"@antfu/ni": "^0.21.12",
"@types/node": "^20.12.12",
"bumpp": "^9.4.1",
"eslint": "^9.3.0",
Expand All @@ -55,7 +46,7 @@
"vitest": "^1.6.0"
},
"simple-git-hooks": {
"pre-commit": "pnpm lint-staged && pnpm build && git add dist"
"pre-commit": "npx lint-staged && npm run build && git add dist"
},
"lint-staged": {
"*": "eslint --fix"
Expand Down
9 changes: 0 additions & 9 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit aa86b40

Please sign in to comment.