Add ESLint action for Main UI
Signed-off-by: Yannick Schaus <github@schaus.net>pull/887/head
parent
42807da91f
commit
eed87a8adb
|
@ -0,0 +1,48 @@
|
|||
# This is a basic workflow to help you get started with Actions
|
||||
|
||||
name: Main UI ESLint
|
||||
|
||||
on:
|
||||
# Triggers the workflow on push or pull request events but only for the main branch
|
||||
push:
|
||||
branches: [ main ]
|
||||
paths: bundles/org.openhab.ui/web
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
paths: bundles/org.openhab.ui/web
|
||||
|
||||
# Allows you to run this workflow manually from the Actions tab
|
||||
workflow_dispatch:
|
||||
|
||||
defaults:
|
||||
run:
|
||||
working-directory: bundles/org.openhab.ui/web
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||
steps:
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '12.x'
|
||||
|
||||
- name: Cache node modules
|
||||
id: cache
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: node_modules # npm cache files are stored in `~/.npm` on Linux/macOS
|
||||
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-build-${{ env.cache-name }}-
|
||||
${{ runner.os }}-build-
|
||||
${{ runner.os }}-
|
||||
|
||||
- name: Install Dependencies
|
||||
run: npm install
|
||||
|
||||
- name: Run ESLint
|
||||
run: npx eslint src/**/*.js src/**/*.vue
|
Loading…
Reference in New Issue