mirror of
https://github.com/kuhyx/steam-backlog-enforcer.git
synced 2026-11-29 13:43:29 +01:00
Compare commits
No commits in common. "ef998912fb5a05d275fa34cf4059c134a287cc4b" and "d99e87f5b11b508b77d6565253beb1833643ea26" have entirely different histories.
ef998912fb
...
d99e87f5b1
40
.github/workflows/pre-commit.yml
vendored
40
.github/workflows/pre-commit.yml
vendored
@ -7,25 +7,8 @@ on:
|
|||||||
branches: [main]
|
branches: [main]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# mypy and pylint check the whole repo and dominated a single ~50 s job, so
|
|
||||||
# each gets its own runner and the other hooks share a third; the workflow
|
|
||||||
# takes as long as the slowest group rather than the sum.
|
|
||||||
pre-commit:
|
pre-commit:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- group: mypy
|
|
||||||
hooks: mypy
|
|
||||||
skip: ""
|
|
||||||
- group: pylint
|
|
||||||
hooks: pylint
|
|
||||||
skip: ""
|
|
||||||
- group: rest
|
|
||||||
hooks: ""
|
|
||||||
skip: mypy,pylint
|
|
||||||
name: pre-commit (${{ matrix.group }})
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
@ -42,23 +25,6 @@ jobs:
|
|||||||
- uses: actions/setup-python@v5
|
- uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: "3.x"
|
python-version: "3.x"
|
||||||
- uses: astral-sh/setup-uv@v10.2.0
|
- name: Install dependencies
|
||||||
|
run: pip install -r requirements.txt
|
||||||
# Every hook brings its own environment except the language: system
|
- uses: pre-commit/action@v3.0.1
|
||||||
# ones; of those only dependency-freshness imports third-party code
|
|
||||||
# (pyyaml, packaging). The whole requirements.txt used to be installed
|
|
||||||
# here for nothing.
|
|
||||||
- name: Install pre-commit and the system hooks' imports
|
|
||||||
run: uv pip install --system pre-commit pyyaml packaging
|
|
||||||
|
|
||||||
# One cache per group: a shared key would hold whichever group saved
|
|
||||||
# first, and the others would rebuild their hook envs on every run.
|
|
||||||
- uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: ~/.cache/pre-commit
|
|
||||||
key: pre-commit-${{ matrix.group }}-${{ env.pythonLocation }}-${{ hashFiles('.pre-commit-config.yaml') }}
|
|
||||||
|
|
||||||
- name: pre-commit run (${{ matrix.group }})
|
|
||||||
env:
|
|
||||||
SKIP: ${{ matrix.skip }}
|
|
||||||
run: pre-commit run ${{ matrix.hooks }} --all-files --show-diff-on-failure --color=always
|
|
||||||
|
|||||||
15
.github/workflows/python-tests.yml
vendored
15
.github/workflows/python-tests.yml
vendored
@ -18,27 +18,16 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
python-version: "3.x"
|
python-version: "3.x"
|
||||||
|
|
||||||
# uv with a cached wheel store installs requirements.txt in seconds;
|
|
||||||
# plain pip took ~20 s of a ~70 s run.
|
|
||||||
- uses: astral-sh/setup-uv@v10.2.0
|
|
||||||
with:
|
|
||||||
enable-cache: true
|
|
||||||
cache-dependency-glob: requirements.txt
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: uv pip install --system -r requirements.txt
|
run: pip install -r requirements.txt
|
||||||
|
|
||||||
# -n auto spreads the suite over every runner core (pytest-xdist is in
|
|
||||||
# requirements.txt); pytest-cov merges the workers' coverage.
|
|
||||||
- name: Run tests with coverage
|
- name: Run tests with coverage
|
||||||
run: |
|
run: |
|
||||||
python -m pytest steam_backlog_enforcer/tests/ \
|
python -m pytest steam_backlog_enforcer/tests/ \
|
||||||
-n auto \
|
|
||||||
-p no:sugar \
|
|
||||||
--cov=steam_backlog_enforcer \
|
--cov=steam_backlog_enforcer \
|
||||||
--cov-branch \
|
--cov-branch \
|
||||||
--cov-fail-under=100 \
|
--cov-fail-under=100 \
|
||||||
-q
|
-v
|
||||||
|
|
||||||
# vitest's 100% bar used to run only in the local pre-push hook, which
|
# vitest's 100% bar used to run only in the local pre-push hook, which
|
||||||
# became a 1-second stamp check on 2026-09-20 (pre-commit's manual stage
|
# became a 1-second stamp check on 2026-09-20 (pre-commit's manual stage
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user