File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Upload Python Package
2+
3+ on :
4+ workflow_dispatch :
5+ push :
6+ tags :
7+ - v*.*.*
8+
9+ permissions :
10+ contents : read
11+
12+ jobs :
13+ pypi-publish :
14+ name : Upload release to PyPI
15+ runs-on : ubuntu-latest
16+
17+ steps :
18+ - uses : actions/checkout@v3
19+ - name : Build and publish
20+ uses : JRubics/poetry-publish@v1.17
21+ with :
22+ pypi_token : ${{ secrets.PYPI_TOKEN }}
Original file line number Diff line number Diff line change 1+ name : Run Python tests
2+
3+ on : [push]
4+
5+ jobs :
6+ build :
7+ name : Run tests
8+ runs-on : ubuntu-latest
9+ strategy :
10+ matrix :
11+ python-version : ["3.9", "3.10", "3.11", "3.x"]
12+
13+ steps :
14+ - uses : actions/checkout@v3
15+
16+ - name : Set up Python ${{ matrix.python-version }}
17+ uses : actions/setup-python@v4
18+ with :
19+ python-version : ${{ matrix.python-version }}
20+
21+ - name : Install dependencies
22+ run : |
23+ python -m pip install -U pip
24+ python -m pip install -U coverage pytest pytest-cov poetry
25+ python -m poetry install
26+ python -m poetry self add poetry-plugin-export
27+ python -m poetry export -f requirements.txt --output requirements.txt
28+ python -m pip install -r requirements.txt
29+
30+ - name : Lint with Ruff
31+ run : |
32+ python -m pip install -U ruff
33+ ruff --per-file-ignores="__init__.py:F401" --per-file-ignores="__init__.py:E402" .
34+ continue-on-error : true
35+
36+ - name : Test with pytest
37+ run : |
38+ coverage run -m pytest -v -s
39+
40+ - name : Generate Coverage Report
41+ run : |
42+ coverage report -m
You can’t perform that action at this time.
0 commit comments