|
name: Linter |
|
|
|
on: |
|
- push |
|
- pull_request |
|
|
|
jobs: |
|
lint-python: |
|
name: ruff |
|
runs-on: ubuntu-latest |
|
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name |
|
steps: |
|
- name: Checkout Code |
|
uses: actions/checkout@v3 |
|
- uses: actions/setup-python@v4 |
|
with: |
|
python-version: 3.11 |
|
|
|
|
|
|
|
|
|
- name: Install Ruff |
|
run: pip install ruff==0.0.272 |
|
- name: Run Ruff |
|
run: ruff . |
|
lint-js: |
|
name: eslint |
|
runs-on: ubuntu-latest |
|
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name |
|
steps: |
|
- name: Checkout Code |
|
uses: actions/checkout@v3 |
|
- name: Install Node.js |
|
uses: actions/setup-node@v3 |
|
with: |
|
node-version: 18 |
|
- run: npm i --ci |
|
- run: npm run lint |
|
|