Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update packaging #4

Merged
merged 7 commits into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 20 additions & 18 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,44 +7,46 @@ on:

jobs:
test:
runs-on: ubuntu-latest
strategy:
# By default, GitHub will maximize the number of jobs run in parallel
# depending on the available runners on GitHub-hosted virtual machines.
# max-parallel: 8
fail-fast: false
matrix:
include:
- python-version: "3.7"
- python-version: "3.8"
- python-version: "3.9"
- python-version: "3.10"

python-version: ["3.8", "3.9", "3.10", "3.11"]
poetry-version: ["1.2.2", "1.7.1"]
os: [ubuntu-22.04, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Run image
uses: abatilo/actions-poetry@v2
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Upgrade pip version
run: python -m pip install -U pip

- name: Install dependencies
run: pip install -r requirements.txt

- name: Setup environment
run: poetry install
- name: Show environment
run: poetry run pip list
- name: Tests
run: |
pytest --cov=scan_pdf --cov-report xml:reports/coverage.xml --cov-report term --junitxml=reports/junit.xml
poetry run pytest --cov=scan_pdf --cov-report xml:reports/coverage.xml --cov-report term --junitxml=reports/junit.xml
head -30 reports/coverage.xml

- name: Build
run: python setup.py sdist
run: poetry build

- uses: sonarsource/sonarqube-scan-action@master
if: matrix.python-version == '3.8'
# if: matrix.python-version == '3.8'
if: false
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
Expand Down
261 changes: 261 additions & 0 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[tool.poetry]
name = "scan-pdf"
version = "0.4.0"
description = "Tools for using scanners with document feeder"
authors = ["Andreas Würl <andi@tryb.de>"]
license = "Apache-2.0"
readme = "README.rst"

[tool.poetry.dependencies]
python = "^3.8"
pypdf = "^4.2.0"

[tool.poetry.group.dev.dependencies]
pytest-cov = "^5.0.0"
pytest-mock = "^3.14.0"
mock = "^5.1.0"
assertpy = "^1.1"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
34 changes: 0 additions & 34 deletions requirements.txt

This file was deleted.

Loading
Loading