diff --git a/.github/workflows/javascript.yaml b/.github/workflows/javascript.yaml deleted file mode 100644 index a07b516ac6..0000000000 --- a/.github/workflows/javascript.yaml +++ /dev/null @@ -1,50 +0,0 @@ -# Check javascript template files - -name: Javascript 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 Templated Files - run: | - cd ci - python check_js_templates.py - - name: Lint Javascript Files - run: | - npm install eslint eslint-config-google - invoke render-js-files - npx eslint js_tmp/*.js \ No newline at end of file diff --git a/.github/workflows/pr_checks.yaml b/.github/workflows/pr_checks.yaml index f58732af9c..4d0e8fcd0e 100644 --- a/.github/workflows/pr_checks.yaml +++ b/.github/workflows/pr_checks.yaml @@ -13,6 +13,13 @@ on: env: python_version: 3.7 + node_version: 16 + + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + INVENTREE_DB_ENGINE: sqlite3 + INVENTREE_DB_NAME: inventree + INVENTREE_MEDIA_ROOT: ./media + INVENTREE_STATIC_ROOT: ./static jobs: @@ -47,3 +54,37 @@ jobs: - name: flake8 run: | flake8 InvenTree + + javascript: + name: javascript template files + needs: pep_style + runs-on: ubuntu-latest + + steps: + - name: Checkout Code + uses: actions/checkout@v2 + - name: Install node.js ${{ env.node_version }} + uses: actions/setup-node@v2 + with: + node-version: ${{ env.node_version }} + - run: npm install + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: ${{ env.python_version }} + - name: Install Dependencies + run: | + sudo apt-get update + sudo apt-get install gettext + pip3 install invoke + invoke install + invoke static + - name: Check Templated Files + run: | + cd ci + python check_js_templates.py + - name: Lint Javascript Files + run: | + npm install eslint eslint-config-google + invoke render-js-files + npx eslint js_tmp/*.js