my-sd/.gitea/workflows/on_pull_request.yaml
soaska 919b945d7c
Some checks failed
Linter / ruff (push) Failing after 32s
Tests / tests on CPU (push) Failing after 1m1s
Linter / eslint (push) Has been cancelled
Tried to set tests for gitea, added userjs and styles
2024-05-02 23:06:54 +03:00

39 lines
1.2 KiB
YAML

name: Linter
on:
- push
- pull_request
jobs:
lint-python:
name: ruff
runs-on: soaska
if: gitea.event_name != 'pull_request' || gitea.event.pull_request.head.repo.full_name != gitea.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
# NB: there's no cache: pip here since we're not installing anything
# from the requirements.txt file(s) in the repository; it's faster
# not to have GHA download an (at the time of writing) 4 GB cache
# of PyTorch and other dependencies.
- name: Install Ruff
run: pip install ruff==0.1.6
- name: Run Ruff
run: ruff .
lint-js:
name: eslint
runs-on: ubuntu-latest
if: gitea.event_name != 'pull_request' || gitea.event.pull_request.head.repo.full_name != gitea.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