1
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:
XhmikosR
2021-11-02 17:05:42 +02:00
parent e81e5266b9
commit fcd9ec216a
2 changed files with 24 additions and 4 deletions

View File

@ -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

View File

@ -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": [