2021-07-28 23:23:24 +00:00
|
|
|
# Check javascript template files
|
|
|
|
|
|
|
|
name: Javascript Templates
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
|
|
|
|
pull_request:
|
|
|
|
branches-ignore:
|
|
|
|
- l10*
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
2021-07-28 23:26:56 +00:00
|
|
|
javascript:
|
2021-07-28 23:23:24 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2021-08-28 10:59:41 +00:00
|
|
|
INVENTREE_DB_ENGINE: sqlite3
|
|
|
|
INVENTREE_DB_NAME: inventree
|
2021-07-28 23:23:24 +00:00
|
|
|
steps:
|
2021-08-28 10:59:41 +00:00
|
|
|
- name: Install node.js
|
|
|
|
uses: actions/setup-node@v2
|
|
|
|
- run: npm install
|
2021-07-28 23:23:24 +00:00
|
|
|
- name: Checkout Code
|
|
|
|
uses: actions/checkout@v2
|
2021-08-28 11:03:09 +00:00
|
|
|
- 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
|
2021-08-28 11:05:55 +00:00
|
|
|
invoke static
|
2021-08-28 10:59:41 +00:00
|
|
|
- name: Check Templated Files
|
2021-07-28 23:23:24 +00:00
|
|
|
run: |
|
|
|
|
cd ci
|
|
|
|
python check_js_templates.py
|
2021-08-28 10:59:41 +00:00
|
|
|
- name: Lint Javascript Files
|
|
|
|
run: |
|
|
|
|
invoke render-js-files
|
|
|
|
npx eslint js_tmp/*.js
|