Add ESLint to CI
This commit is contained in:
parent
13f4c62ba3
commit
4f11f285f9
36
.github/workflows/on_pull_request.yaml
vendored
36
.github/workflows/on_pull_request.yaml
vendored
@ -1,19 +1,11 @@
|
|||||||
# See https://github.com/actions/starter-workflows/blob/1067f16ad8a1eac328834e4b0ae24f7d206f810d/ci/pylint.yml for original reference file
|
|
||||||
name: Run Linting/Formatting on Pull Requests
|
name: Run Linting/Formatting on Pull Requests
|
||||||
|
|
||||||
on:
|
on:
|
||||||
- push
|
- push
|
||||||
- pull_request
|
- pull_request
|
||||||
# See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onpull_requestpull_request_targetbranchesbranches-ignore for syntax docs
|
|
||||||
# if you want to filter out branches, delete the `- pull_request` and uncomment these lines :
|
|
||||||
# pull_request:
|
|
||||||
# branches:
|
|
||||||
# - master
|
|
||||||
# branches-ignore:
|
|
||||||
# - development
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint:
|
lint-python:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Code
|
- name: Checkout Code
|
||||||
@ -29,18 +21,14 @@ jobs:
|
|||||||
run: pip install ruff==0.0.265
|
run: pip install ruff==0.0.265
|
||||||
- name: Run Ruff
|
- name: Run Ruff
|
||||||
run: ruff .
|
run: ruff .
|
||||||
|
lint-js:
|
||||||
# The rest are currently disabled pending fixing of e.g. installing the torch dependency.
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
# - name: Install PyLint
|
- name: Checkout Code
|
||||||
# run: |
|
uses: actions/checkout@v3
|
||||||
# python -m pip install --upgrade pip
|
- name: Install Node.js
|
||||||
# pip install pylint
|
uses: actions/setup-node@v3
|
||||||
# # This lets PyLint check to see if it can resolve imports
|
with:
|
||||||
# - name: Install dependencies
|
node-version: 18
|
||||||
# run: |
|
- run: npm i --ci
|
||||||
# export COMMANDLINE_ARGS="--skip-torch-cuda-test --exit"
|
- run: npm run lint
|
||||||
# python launch.py
|
|
||||||
# - name: Analysing the code with pylint
|
|
||||||
# run: |
|
|
||||||
# pylint $(git ls-files '*.py')
|
|
||||||
|
Loading…
Reference in New Issue
Block a user