Skip to content

Commit 872eecd

Browse files
ci: consolidate env setup (#67)
* ci: consolidate env setup * style: pre-commit fixes * fix: bump test dependencies Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent fbf099c commit 872eecd

3 files changed

Lines changed: 11 additions & 38 deletions

File tree

.github/workflows/ci.yml

Lines changed: 5 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,6 @@ jobs:
2727

2828
- name: Install uv
2929
uses: astral-sh/setup-uv@85856786d1ce8acfbcc2f13a5f3fbd6b938f9f41 # v7.1.2
30-
with:
31-
enable-cache: true
32-
cache-dependency-glob: "uv.lock"
33-
34-
- name: "Set up Python"
35-
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
36-
with:
37-
python-version-file: ".python-version"
3830

3931
- name: Install the project
4032
run: uv sync --group nox
@@ -58,25 +50,13 @@ jobs:
5850

5951
- name: Install uv
6052
uses: astral-sh/setup-uv@85856786d1ce8acfbcc2f13a5f3fbd6b938f9f41 # v7.1.2
61-
with:
62-
enable-cache: true
63-
cache-dependency-glob: "uv.lock"
64-
65-
- uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
6653
with:
6754
python-version: ${{ matrix.python-version }}
68-
allow-prereleases: true
69-
70-
- name: Set up Python ${{ matrix.python-version }}
71-
run: uv python install ${{ matrix.python-version }}
72-
73-
- name: Install the project
74-
run: uv sync --group test
7555

7656
- name: Test package
7757
run: >-
78-
uv run pytest -ra --cov --cov-report=xml --cov-report=term
79-
--durations=20
58+
uv run --group test pytest -ra --cov --cov-report=xml
59+
--cov-report=term --durations=20
8060
8161
- name: Upload coverage report
8262
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
@@ -99,19 +79,12 @@ jobs:
9979
- name: Install uv
10080
uses: astral-sh/setup-uv@85856786d1ce8acfbcc2f13a5f3fbd6b938f9f41 # v7.1.2
10181
with:
102-
enable-cache: true
103-
cache-dependency-glob: "uv.lock"
104-
105-
- name: Set up Python ${{ matrix.python-version }}
106-
run: uv python install ${{ matrix.python-version }}
107-
108-
- name: Install the project
109-
run: uv sync --group test --resolution lowest-direct
82+
python-version: ${{ matrix.python-version }}
11083

11184
- name: Test package
11285
run: >-
113-
uv run pytest -ra --cov --cov-report=xml --cov-report=term
114-
--durations=20
86+
uv run --group test --resolution lowest-direct pytest --cov
87+
--cov-report=xml --cov-report=term --durations=20
11588
11689
- name: Upload coverage report
11790
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ repos:
4646
- repo: https://github.com/astral-sh/ruff-pre-commit
4747
rev: "v0.13.3"
4848
hooks:
49-
- id: ruff
49+
- id: ruff-check
5050
args: ["--fix", "--show-fixes"]
5151
- id: ruff-format
5252

pyproject.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ dev = [
4848
]
4949
nox = ["nox>=2024.10.9"]
5050
test = [
51-
"attrs",
52-
"pytest >=6",
53-
"pytest-cov >=3",
54-
"sybil",
51+
"attrs>=25.4.0",
52+
"pytest>=8.4.2",
53+
"pytest-cov>=7.0.0",
54+
"sybil[pytest]>=9.2.0",
5555
]
5656

5757
[tool.hatch]
@@ -64,7 +64,7 @@ name = "cz_gitmoji"
6464

6565

6666
[tool.pytest.ini_options]
67-
minversion = "6.0"
67+
minversion = "8.0"
6868
addopts = ["-ra", "--showlocals", "--strict-markers", "--strict-config"]
6969
xfail_strict = true
7070
filterwarnings = [

0 commit comments

Comments
 (0)