mirror of
https://github.com/sshuttle/sshuttle.git
synced 2025-04-24 11:19:00 +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:
|
||||
matrix:
|
||||
python-version: ["3.9", "3.10", "3.11", "3.12"]
|
||||
|
||||
poetry-version: ["main"]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
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: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r requirements-tests.txt
|
||||
poetry config virtualenvs.create true --local
|
||||
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
|
||||
run: |
|
||||
flake8 sshuttle tests --count --show-source --statistics
|
||||
- name: Test with pytest
|
||||
run: |
|
||||
PYTHONPATH=$PWD pytest
|
||||
poetry run flake8 sshuttle tests --count --show-source --statistics
|
||||
- name: Run the automated tests
|
||||
run: poetry run pytest -v
|
||||
|
@ -4,6 +4,12 @@ build:
|
||||
os: ubuntu-20.04
|
||||
tools:
|
||||
python: "3.9"
|
||||
jobs:
|
||||
post_create_environment:
|
||||
- pip install poetry
|
||||
- poetry config virtualenvs.create false
|
||||
post_install:
|
||||
- poetry install --with docs
|
||||
|
||||
sphinx:
|
||||
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]
|
||||
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