mirror of
https://github.com/log4js-node/log4js-node.git
synced 2025-12-08 19:26:01 +00:00
Merge pull request #1328 from log4js-node/update-ci
ci: skip prettier on older Node.js (8.x, 10.x, 12.x)
This commit is contained in:
commit
ae75c368f6
16
.github/workflows/node.js.yml
vendored
16
.github/workflows/node.js.yml
vendored
@ -26,13 +26,16 @@ jobs:
|
||||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
|
||||
include:
|
||||
- node-version: 8.x
|
||||
npm-i: "@commitlint/cli@9.x @commitlint/config-conventional@9.x eslint@6.x eslint-config-airbnb-base@14.x eslint-config-prettier@6.x fs-extra@8.x husky@6.x"
|
||||
npm-i: "eslint@6.x eslint-config-airbnb-base@14.x eslint-config-prettier@6.x eslint-plugin-prettier@3.x fs-extra@8.x nyc@14.x tap@14.x"
|
||||
|
||||
- node-version: 10.x
|
||||
npm-i: "@commitlint/cli@12.x @commitlint/config-conventional@12.x eslint@7.x fs-extra@9.x husky@6.x"
|
||||
npm-i: "eslint@7.x fs-extra@9.x nyc@14.x tap@14.x"
|
||||
|
||||
- node-version: 12.x
|
||||
npm-i: "@commitlint/cli@16.x @commitlint/config-conventional@16.x husky@7.x"
|
||||
npm-i: "nyc@14.x tap@14.x"
|
||||
|
||||
- node-version: 14.x
|
||||
npm-i: "nyc@14.x tap@14.x"
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
@ -57,6 +60,13 @@ jobs:
|
||||
echo "::set-output name=install::npm ci"
|
||||
fi
|
||||
|
||||
- name: Disable prettier on older Node.js (8.x, 10.x, 12.x)
|
||||
run: |
|
||||
sed -i '/"prettier": "prettier/d' package.json
|
||||
echo Removed
|
||||
sed -n '/"prettier": "prettier/p' package.json
|
||||
if: contains(fromJson('["8.x", "10.x", "12.x"]'), matrix.node-version)
|
||||
|
||||
- name: Install downgraded modules ${{ matrix.npm-i }}
|
||||
run: |
|
||||
npm install --save-dev ${{ matrix.npm-i }}
|
||||
|
||||
@ -34,7 +34,8 @@
|
||||
},
|
||||
"scripts": {
|
||||
"prepare": "is-ci || husky install",
|
||||
"pretest": "prettier --check \"**/*.*\" && eslint \"lib/**/*.js\" \"test/**/*.js\"",
|
||||
"pretest": "npm run prettier --if-present && eslint \"lib/**/*.js\" \"test/**/*.js\"",
|
||||
"prettier": "prettier --check \"**/*.*\"",
|
||||
"prettier:fix": "prettier --write \"**/*.*\"",
|
||||
"test": "tap \"test/tap/**/*.js\" --cov --reporter=classic --timeout=45",
|
||||
"typings": "tsc -p types/tsconfig.json"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user