1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-11-08 19:26:48 +00:00
webvirtcloud/.github/workflows/linter.yml
catborise ab15fafe9c ci: a pull request's commit is tested once
Both workflows ran on a push to any branch and on its pull request, so
every commit of a pull request ran the whole matrix twice, the two runs
sharing the runners: a pull request waited about ten minutes for its
checks. A push now runs them for master only; a pull request, also one
stacked on another, is tested by its pull_request run.
2026-11-02 07:30:51 +03:00

32 lines
735 B
YAML

name: Lint
# a branch with a pull request (also one stacked on another) is tested by its
# pull_request run; push runs for every branch tested each commit twice
on:
push:
branches: [master]
pull_request:
# the jobs only read the code
permissions:
contents: read
jobs:
ruff:
name: Ruff
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
# Same ruff version as dev/requirements.txt
- name: Install Ruff
run: pip install "$(grep '^ruff==' dev/requirements.txt)"
- name: Run Ruff
run: ruff check --output-format=github .