mirror of
https://github.com/retspen/webvirtcloud
synced 2026-11-08 11:16:47 +00:00
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.
32 lines
735 B
YAML
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 .
|