Skip to content

Commit e89e57f

Browse files
authored
ci: more cleanup, simplify matrix (#395)
1 parent aba0315 commit e89e57f

File tree

7 files changed

+66
-45
lines changed

7 files changed

+66
-45
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ on:
33
types:
44
- published
55

6+
concurrency:
7+
group: ${{ github.workflow }}-${{ github.ref }}
8+
cancel-in-progress: false
9+
610
name: release
711

812
permissions: {}

.github/workflows/tests.yml

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,20 @@ concurrency:
1515
cancel-in-progress: true
1616

1717
jobs:
18+
lint:
19+
name: Lint
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
24+
with:
25+
persist-credentials: false
26+
27+
- name: Install the latest version of uv
28+
uses: astral-sh/setup-uv@85856786d1ce8acfbcc2f13a5f3fbd6b938f9f41 # v7.1.2
29+
30+
- run: make lint
31+
1832
tests:
1933
name: "Python ${{ matrix.python-version }} ${{ matrix.os }}"
2034
runs-on: "${{ matrix.os }}"
@@ -30,15 +44,10 @@ jobs:
3044
with:
3145
persist-credentials: false
3246

33-
- uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
34-
with:
35-
python-version: "${{ matrix.python-version }}"
36-
allow-prereleases: true
37-
3847
- name: Install the latest version of uv
3948
uses: astral-sh/setup-uv@85856786d1ce8acfbcc2f13a5f3fbd6b938f9f41 # v7.1.2
4049

4150
- name: Run tests for ${{ matrix.python-version }}
42-
run: |
43-
make bootstrap
44-
make test
51+
run: make test
52+
env:
53+
UV_PYTHON: "${{ matrix.python-version }}"

.github/workflows/zizmor.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
pull_request:
77
branches: ["**"]
88

9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
11+
cancel-in-progress: true
12+
913
permissions: {}
1014

1115
jobs:

CONTRIBUTING.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,6 @@ You can run the unit tests locally with:
4747
```bash
4848
# run the test suite in the current environment
4949
make test
50-
51-
# OPTIONAL: use `tox` to fan out across multiple interpreters
52-
make test-all
5350
```
5451

5552
### Documentation
@@ -70,8 +67,8 @@ Releases of `CacheControl` are managed by GitHub Actions.
7067

7168
To perform a release:
7269

73-
1. Update `CacheControl`'s `__version__` attribute. It can be found under
74-
`cachecontrol/__init__.py`.
70+
1. Update `CacheControl`'s `version` attribute. It can be found
71+
in the `pyproject.toml` file, under the `[project]` section.
7572

7673
1. Create a new tag corresponding to your new version, with a `v` prefix. For example:
7774

Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ VENV=.venv
66
ACTIVATE = $(VENV)/bin/activate
77

88
bootstrap:
9-
uv sync --extra dev
9+
uv sync --dev
1010

1111
lint:
12-
uv run ruff check
13-
uv run mypy cachecontrol
12+
uv run --dev ruff check
13+
uv run --dev mypy cachecontrol
1414

1515
format:
1616
uv run codespell
@@ -40,10 +40,10 @@ clean-test:
4040
rm -fr htmlcov/
4141

4242
test:
43-
uv run py.test
43+
uv run --dev py.test
4444

4545
coverage:
46-
uv run py.test --cov cachecontrol
46+
uv run --dev py.test --cov cachecontrol
4747

4848
dist: clean
4949
uv build

pyproject.toml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,7 @@ Homepage = "https://pypi.org/project/CacheControl/"
4040
Issues = "https://github.com/psf/cachecontrol/issues"
4141
Source = "https://github.com/psf/cachecontrol"
4242

43-
[project.optional-dependencies]
44-
# End-user extras.
45-
filecache = ["filelock >= 3.8.0"]
46-
redis = ["redis>=2.10.5"]
47-
43+
[dependency-groups]
4844
# Development extras.
4945
dev = [
5046
"CacheControl[filecache,redis]",
@@ -64,6 +60,12 @@ dev = [
6460
"types-requests",
6561
]
6662

63+
[project.optional-dependencies]
64+
# End-user extras.
65+
filecache = ["filelock >= 3.8.0"]
66+
redis = ["redis>=2.10.5"]
67+
68+
6769
[project.scripts]
6870
doesitcache = "cachecontrol._cmd:main"
6971

uv.lock

Lines changed: 27 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)