Skip to content

Commit a545e5f

Browse files
refactor: cleanup (#6)
1 parent 390f8a6 commit a545e5f

6 files changed

Lines changed: 33 additions & 81 deletions

File tree

File renamed without changes.

.github/workflows/documentationjs.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ jobs:
1313
- name: Build documentation
1414
uses: zakodium/documentationjs-action@v1
1515
- name: Deploy to GitHub pages
16-
uses: JamesIves/github-pages-deploy-action@releases/v3
16+
uses: JamesIves/github-pages-deploy-action@releases/v4
1717
with:
18-
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
19-
BRANCH: gh-pages
20-
FOLDER: docs
21-
CLEAN: true
18+
token: ${{ secrets.BOT_TOKEN }}
19+
branch: gh-pages
20+
folder: docs
21+
clean: true

.github/workflows/nodejs.yml

Lines changed: 7 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,39 +2,13 @@ name: Node.js CI
22

33
on:
44
push:
5-
branches: master
5+
branches:
6+
- master
67
pull_request:
78

8-
env:
9-
NODE_VERSION: 14.x
10-
119
jobs:
12-
lint:
13-
runs-on: ubuntu-latest
14-
steps:
15-
- uses: actions/checkout@v2
16-
- uses: actions/setup-node@v2
17-
with:
18-
node-version: ${{ env.NODE_VERSION }}
19-
- name: Install dependencies
20-
run: npm install
21-
- name: Run ESLint
22-
run: npm run eslint
23-
test:
24-
runs-on: ubuntu-latest
25-
strategy:
26-
matrix:
27-
node-version: [12.x, 14.x, 15.x]
28-
fail-fast: false
29-
steps:
30-
- uses: actions/checkout@v2
31-
- name: Use Node.js ${{ matrix.node-version }}
32-
uses: actions/setup-node@v2
33-
with:
34-
node-version: ${{ matrix.node-version }}
35-
- name: Install dependencies
36-
run: npm install
37-
- name: Run tests
38-
run: npm run test-coverage
39-
- name: Send coverage report to Codecov
40-
uses: codecov/codecov-action@v1
10+
nodejs:
11+
# Documentation: https://github.com/zakodium/workflows#nodejs-ci
12+
uses: zakodium/workflows/.github/workflows/nodejs.yml@nodejs-v1
13+
with:
14+
node-version-matrix: '[12, 14, 16]'

.github/workflows/release.yml

Lines changed: 9 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,33 +5,13 @@ on:
55
branches:
66
- master
77

8-
env:
9-
NODE_VERSION: 14.x
10-
118
jobs:
12-
release-please:
13-
runs-on: ubuntu-latest
14-
steps:
15-
- name: Get package name
16-
run: echo "PACKAGE_NAME=$(jq .name package.json | tr -d '"')" >> $GITHUB_ENV
17-
- uses: GoogleCloudPlatform/release-please-action@v2
18-
id: release
19-
with:
20-
token: ${{ secrets.BOT_TOKEN }}
21-
release-type: node
22-
package-name: ${{ env.PACKAGE_NAME }}
23-
bump-minor-pre-major: Yes
24-
- uses: actions/checkout@v2
25-
# These if statements ensure that a publication only occurs when a new release is created
26-
if: ${{ steps.release.outputs.release_created }}
27-
- uses: actions/setup-node@v2
28-
with:
29-
node-version: ${{ env.NODE_VERSION }}
30-
registry-url: 'https://registry.npmjs.org'
31-
if: ${{ steps.release.outputs.release_created }}
32-
- run: npm install
33-
if: ${{ steps.release.outputs.release_created }}
34-
- run: npm publish --access public
35-
env:
36-
NODE_AUTH_TOKEN: ${{ secrets.NPM_BOT_TOKEN }}
37-
if: ${{ steps.release.outputs.release_created }}
9+
release:
10+
# Documentation: https://github.com/zakodium/workflows#release
11+
uses: zakodium/workflows/.github/workflows/release.yml@release-v1
12+
with:
13+
npm: true
14+
secrets:
15+
github-token: ${{ secrets.BOT_TOKEN }}
16+
npm-token: ${{ secrets.NPM_BOT_TOKEN }}
17+
File renamed without changes.

package.json

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@
1111
"scripts": {
1212
"eslint": "eslint src",
1313
"eslint-fix": "npm run eslint -- --fix",
14-
"prepublishOnly": "rollup -c",
15-
"test": "npm run test-coverage && npm run eslint",
16-
"test-coverage": "jest --coverage",
17-
"test-only": "jest"
14+
"prepack": "rollup -c",
15+
"prettier": "prettier --check src",
16+
"prettier-write": "prettier --write src",
17+
"test": "npm run test-only && npm run eslint && npm run prettier",
18+
"test-only": "jest --coverage"
1819
},
1920
"repository": {
2021
"type": "git",
@@ -27,18 +28,15 @@
2728
"url": "https://github.com/mljs/baseline-correction-regression/issues"
2829
},
2930
"homepage": "https://github.com/mljs/baseline-correction-regression#readme",
30-
"jest": {
31-
"testEnvironment": "node"
32-
},
3331
"devDependencies": {
34-
"@babel/plugin-transform-modules-commonjs": "^7.13.8",
35-
"eslint": "^7.22.0",
36-
"eslint-config-cheminfo": "^5.2.3",
37-
"jest": "^26.6.3",
38-
"prettier": "^2.2.1",
39-
"rollup": "^2.42.3"
32+
"@babel/plugin-transform-modules-commonjs": "^7.16.8",
33+
"eslint": "^8.10.0",
34+
"eslint-config-cheminfo": "^7.2.2",
35+
"jest": "^27.5.1",
36+
"prettier": "^2.5.1",
37+
"rollup": "^2.69.1"
4038
},
4139
"dependencies": {
42-
"ml-regression-polynomial": "^2.1.0"
40+
"ml-regression-polynomial": "^2.2.0"
4341
}
4442
}

0 commit comments

Comments
 (0)