You've already forked hugo-extended
mirror of
https://github.com/jakejarvis/hugo-extended.git
synced 2025-07-03 13:26:38 -04:00
CI: separate lint workflow and rename eslint
script to lint
This commit is contained in:
24
.github/workflows/ci.yml
vendored
24
.github/workflows/ci.yml
vendored
@ -6,8 +6,28 @@ on:
|
||||
|
||||
env:
|
||||
FORCE_COLOR: 2
|
||||
NODE_LINT: 16
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Clone repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: "${{ env.NODE_LINT }}"
|
||||
cache: npm
|
||||
|
||||
- name: Install npm dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Lint
|
||||
run: npm run lint
|
||||
|
||||
test:
|
||||
name: Node ${{ matrix.node }}
|
||||
runs-on: ubuntu-latest
|
||||
@ -31,11 +51,11 @@ jobs:
|
||||
run: npm ci
|
||||
|
||||
- name: Run tests
|
||||
run: npm test
|
||||
run: npm run mocha
|
||||
|
||||
publish:
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
needs: test
|
||||
needs: [lint, test]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
@ -22,9 +22,9 @@
|
||||
"mocha": "^8.4.0"
|
||||
},
|
||||
"scripts": {
|
||||
"eslint": "eslint .",
|
||||
"lint": "eslint .",
|
||||
"mocha": "mocha",
|
||||
"test": "npm run eslint && npm run mocha",
|
||||
"test": "npm run lint && npm run mocha",
|
||||
"postinstall": "rimraf vendor && node lib/install"
|
||||
},
|
||||
"files": [
|
||||
|
Reference in New Issue
Block a user