Browse Source

ci: move to pnpm

pull/926/head
dangreen 3 years ago
parent
commit
b830644b70
  1. 29
      .github/workflows/ci.yml
  2. 14
      package.json
  3. 2129
      pnpm-lock.yaml

29
.github/workflows/node.js.yml → .github/workflows/ci.yml

@ -1,29 +1,32 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: CI
name: Node.js CI
on: on:
push: push:
branches: [ master ] branches: [ master ]
pull_request: pull_request:
branches: [ master ] branches: [ master ]
jobs: jobs:
build: test:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
node-version: [12.x, 14.x, 16.x] node-version: [12.x, 14.x, 16.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ # See supported Node.js release schedule at https://nodejs.org/en/about/releases/
name: Tests (Node.js ${{ matrix.node-version }})
steps: steps:
- uses: actions/checkout@v2 - name: Checkout the repository
- name: Use Node.js ${{ matrix.node-version }} uses: actions/checkout@v2
uses: actions/setup-node@v1 - name: Install pnpm
uses: pnpm/action-setup@v2.0.1
with:
version: 6
- name: Install Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with: with:
node-version: ${{ matrix.node-version }} node-version: ${{ matrix.node-version }}
- run: npm install cache: 'pnpm'
- run: npm test - name: Install dependencies
run: pnpm install
- name: Run tests
run: pnpm test

14
package.json

@ -36,6 +36,13 @@
"license": "MIT", "license": "MIT",
"main": "papaparse.js", "main": "papaparse.js",
"browser": "papaparse.min.js", "browser": "papaparse.min.js",
"scripts": {
"lint": "eslint --no-ignore papaparse.js Gruntfile.js .eslintrc.js 'tests/**/*.js'",
"test-browser": "node tests/test.js",
"test-mocha-headless-chrome": "node tests/test.js --mocha-headless-chrome",
"test-node": "mocha tests/node-tests.js tests/test-cases.js",
"test": "pnpm lint && pnpm test-node && pnpm test-mocha-headless-chrome"
},
"devDependencies": { "devDependencies": {
"chai": "^4.2.0", "chai": "^4.2.0",
"connect": "^3.3.3", "connect": "^3.3.3",
@ -46,12 +53,5 @@
"mocha-headless-chrome": "^4.0.0", "mocha-headless-chrome": "^4.0.0",
"open": "7.0.0", "open": "7.0.0",
"serve-static": "^1.7.1" "serve-static": "^1.7.1"
},
"scripts": {
"lint": "eslint --no-ignore papaparse.js Gruntfile.js .eslintrc.js 'tests/**/*.js'",
"test-browser": "node tests/test.js",
"test-mocha-headless-chrome": "node tests/test.js --mocha-headless-chrome",
"test-node": "mocha tests/node-tests.js tests/test-cases.js",
"test": "npm run lint && npm run test-node && npm run test-mocha-headless-chrome"
} }
} }

2129
pnpm-lock.yaml

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save