mirror of https://github.com/ColorlibHQ/AdminLTE
Add lint and compile tests to CI.
parent
ff66f38cee
commit
ffcbdb2029
|
@ -1,4 +1,4 @@
|
|||
name: Node.js Install Test
|
||||
name: CI
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
|
@ -26,9 +26,16 @@ jobs:
|
|||
- "windows-latest"
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Clone repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Use Node.js ${{ matrix.node }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
- run: npm ci
|
||||
|
||||
- name: Install npm dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Build files
|
||||
run: npm run compile
|
|
@ -0,0 +1,39 @@
|
|||
name: Lint
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
release:
|
||||
types:
|
||||
- created
|
||||
|
||||
env:
|
||||
CI: true
|
||||
NODE: 12.x
|
||||
|
||||
jobs:
|
||||
run:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Clone repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: "${{ env.NODE }}"
|
||||
|
||||
- name: Set up npm cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.npm
|
||||
key: ${{ runner.os }}-node-v${{ env.node }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}}
|
||||
restore-keys: |
|
||||
${{ runner.OS }}-node-v${{ env.node }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
|
||||
${{ runner.OS }}-node-v${{ env.node }}-
|
||||
|
||||
- name: Install npm dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Run lint
|
||||
run: npm run lint
|
|
@ -37,9 +37,10 @@
|
|||
"js": "npm-run-all --sequential js-compile js-minify",
|
||||
"js-compile": "rollup --config build/config/rollup.config.js --sourcemap",
|
||||
"js-minify": "terser --compress typeofs=false --mangle --comments \"/^!/\" --source-map \"content=dist/js/adminlte.js.map,includeSources,url=adminlte.min.js.map\" --output dist/js/adminlte.min.js dist/js/adminlte.js",
|
||||
"lint": "npm run css-lint",
|
||||
"production": "npm-run-all --sequential compile plugins",
|
||||
"prepare-release": "npm-run-all --sequential production docs",
|
||||
"test": "npm-run-all css-lint production",
|
||||
"test": "npm-run-all lint production",
|
||||
"plugins": "node build/npm/Publish.js -v",
|
||||
"sync": "browser-sync start --server --files *.html pages/ dist/",
|
||||
"watch": "npm-run-all --parallel watch-css watch-js",
|
||||
|
|
Loading…
Reference in New Issue