File tree Expand file tree Collapse file tree 2 files changed +35
-0
lines changed Expand file tree Collapse file tree 2 files changed +35
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Run tests
2
+ on :
3
+ push :
4
+ branches :
5
+ - master
6
+
7
+ jobs :
8
+ tests :
9
+ runs-on : ubuntu-22.04
10
+ steps :
11
+ - uses : actions/checkout@v4
12
+ - uses : actions/setup-python@v4
13
+ with :
14
+ python-version : " 3.12"
15
+ - name : Install Poetry
16
+ uses : abatilo/actions-poetry@v2
17
+ - name : Setup a local virtual environment
18
+ run : |
19
+ poetry config virtualenvs.create true --local
20
+ poetry config virtualenvs.in-project true --local
21
+ - uses : actions/cache@v3
22
+ name : Define a cache for the virtual environment based on the dependencies lock file
23
+ with :
24
+ path : ./.venv
25
+ key : venv-${{ hashFiles('poetry.lock') }}
26
+ - name : Install dependencies
27
+ run : poetry install
28
+ - name : Run tests and collect coverage
29
+ run : poetry run pytest --cov .
30
+ - name : Upload coverage raports to Codecov
31
+ uses : codecov/codecov-action@v4.0.1
32
+ with :
33
+ token : ${{ secrets.CODECOV_TOKEN }}
Original file line number Diff line number Diff line change 2
2
3
3
[ ![ Ruff] ( https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json )] ( https://github.com/astral-sh/ruff )
4
4
![ GitHub License] ( https://img.shields.io/github/license/SpaceShaman/pypi-workflow )
5
+ ![ GitHub Actions Workflow Status] ( https://img.shields.io/github/actions/workflow/status/SpaceShaman/pypi-workflow/tests.yml )
6
+ ![ Codecov] ( https://img.shields.io/codecov/c/github/SpaceShaman/pypi-workflow )
You can’t perform that action at this time.
0 commit comments