File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change @@ -37,6 +37,16 @@ test = [
3737[tool .pytest .ini_options ]
3838asyncio_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 ]
4151Homepage = " https://github.com/home-assistant-ecosystem/python-opensensemap-api"
4252Download = " https://github.com/home-assistant-ecosystem/python-opensensemap-api/releases"
You can’t perform that action at this time.
0 commit comments