mirror of
https://github.com/sshuttle/sshuttle.git
synced 2025-04-24 19:29:21 +02:00
fix: replace requirements.txt files with poetry
This commit is contained in:
parent
6f12698209
commit
85dc3199a3
26
.github/workflows/pythonpackage.yml
vendored
26
.github/workflows/pythonpackage.yml
vendored
@ -17,20 +17,30 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
python-version: ["3.9", "3.10", "3.11", "3.12"]
|
python-version: ["3.9", "3.10", "3.11", "3.12"]
|
||||||
|
poetry-version: ["main"]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Set up Python ${{ matrix.python-version }}
|
- name: Set up Python ${{ matrix.python-version }}
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
- name: Install dependencies
|
- name: Run image
|
||||||
|
uses: abatilo/actions-poetry@v3
|
||||||
|
with:
|
||||||
|
poetry-version: ${{ matrix.poetry-version }}
|
||||||
|
- name: Setup a local virtual environment (if no poetry.toml file)
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
poetry config virtualenvs.create true --local
|
||||||
pip install -r requirements-tests.txt
|
poetry config virtualenvs.in-project true --local
|
||||||
|
- uses: actions/cache@v3
|
||||||
|
name: Define a cache for the virtual environment based on the dependencies lock file
|
||||||
|
with:
|
||||||
|
path: ./.venv
|
||||||
|
key: venv-${{ hashFiles('poetry.lock') }}
|
||||||
|
- name: Install the project dependencies
|
||||||
|
run: poetry install
|
||||||
- name: Lint with flake8
|
- name: Lint with flake8
|
||||||
run: |
|
run: |
|
||||||
flake8 sshuttle tests --count --show-source --statistics
|
poetry run flake8 sshuttle tests --count --show-source --statistics
|
||||||
- name: Test with pytest
|
- name: Run the automated tests
|
||||||
run: |
|
run: poetry run pytest -v
|
||||||
PYTHONPATH=$PWD pytest
|
|
||||||
|
@ -4,6 +4,12 @@ build:
|
|||||||
os: ubuntu-20.04
|
os: ubuntu-20.04
|
||||||
tools:
|
tools:
|
||||||
python: "3.9"
|
python: "3.9"
|
||||||
|
jobs:
|
||||||
|
post_create_environment:
|
||||||
|
- pip install poetry
|
||||||
|
- poetry config virtualenvs.create false
|
||||||
|
post_install:
|
||||||
|
- poetry install --with docs
|
||||||
|
|
||||||
sphinx:
|
sphinx:
|
||||||
configuration: docs/conf.py
|
configuration: docs/conf.py
|
||||||
|
1143
poetry.lock
generated
1143
poetry.lock
generated
File diff suppressed because it is too large
Load Diff
@ -23,3 +23,10 @@ build-backend = "poetry.core.masonry.api"
|
|||||||
|
|
||||||
[tool.poetry.scripts]
|
[tool.poetry.scripts]
|
||||||
sshuttle = "sshuttle.cmdline:main"
|
sshuttle = "sshuttle.cmdline:main"
|
||||||
|
|
||||||
|
[tool.poetry.group.docs]
|
||||||
|
optional = true
|
||||||
|
|
||||||
|
[tool.poetry.group.docs.dependencies]
|
||||||
|
sphinx = "7.1.2"
|
||||||
|
furo = "2024.8.6"
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
-r requirements.txt
|
|
||||||
pytest==8.3.4
|
|
||||||
pytest-cov==6.0.0
|
|
||||||
flake8==7.1.1
|
|
||||||
bump2version==1.0.1
|
|
@ -1,2 +0,0 @@
|
|||||||
Sphinx==7.1.2
|
|
||||||
furo==2024.8.6
|
|
Loading…
Reference in New Issue
Block a user