Skip to content

Commit bf070f3

Browse files
committed
Update workflow
1 parent 38acc2c commit bf070f3

2 files changed

Lines changed: 16 additions & 2 deletions

File tree

.github/workflows/testing.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,22 @@ jobs:
1616

1717
steps:
1818
- uses: actions/checkout@v6
19+
1920
- name: Set up Python ${{ matrix.python-version }}
2021
uses: actions/setup-python@v6
2122
with:
2223
python-version: ${{ matrix.python-version }}
24+
2325
- name: Install dependencies
2426
run: |
2527
python -m pip install --upgrade pip hatchling
2628
pip install ".[test]"
29+
2730
- name: Lint with ruff
2831
run: |
2932
pip install ruff
3033
ruff check .
31-
- name: Test with pytest
34+
35+
- name: Run tests with hatch
3236
run: |
33-
pytest tests/
37+
hatch run test:run

pyproject.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,16 @@ test = [
3737
[tool.pytest.ini_options]
3838
asyncio_mode = "auto"
3939

40+
[tool.hatch.envs.test]
41+
dependencies = [
42+
"pytest>=9",
43+
"pytest-asyncio>=0.21",
44+
"aiohttp>=3.8.4,<4"
45+
]
46+
47+
[tool.hatch.envs.test.scripts]
48+
run = "pytest"
49+
4050
[project.urls]
4151
Homepage = "https://github.com/home-assistant-ecosystem/python-opensensemap-api"
4252
Download = "https://github.com/home-assistant-ecosystem/python-opensensemap-api/releases"

0 commit comments

Comments
 (0)