mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Run HTML linting as .github actino
This commit is contained in:
parent
c275bf8d98
commit
514db57c0c
46
.github/workflows/html.yaml
vendored
Normal file
46
.github/workflows/html.yaml
vendored
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
# Check javascript template files
|
||||||
|
|
||||||
|
name: HTML Templates
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
pull_request:
|
||||||
|
branches-ignore:
|
||||||
|
- l10*
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
javascript:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
INVENTREE_DB_ENGINE: sqlite3
|
||||||
|
INVENTREE_DB_NAME: inventree
|
||||||
|
INVENTREE_MEDIA_ROOT: ./media
|
||||||
|
INVENTREE_STATIC_ROOT: ./static
|
||||||
|
steps:
|
||||||
|
- name: Install node.js
|
||||||
|
uses: actions/setup-node@v2
|
||||||
|
- run: npm install
|
||||||
|
- name: Checkout Code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Setup Python
|
||||||
|
uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: 3.7
|
||||||
|
- name: Install Dependencies
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install gettext
|
||||||
|
pip3 install invoke
|
||||||
|
invoke install
|
||||||
|
invoke static
|
||||||
|
- name: Check HTML Files
|
||||||
|
# TODO: Run these checks on *ALL* templated HTML files
|
||||||
|
run: |
|
||||||
|
npm install markuplint
|
||||||
|
npx markuplint InvenTree/templates/*.html
|
Loading…
Reference in New Issue
Block a user