Skip to content

Commit

Permalink
Added poetry
Browse files Browse the repository at this point in the history
  • Loading branch information
MohamedNasser8 committed Jun 10, 2024
1 parent 8350e3d commit e93dea7
Show file tree
Hide file tree
Showing 4 changed files with 1,080 additions and 13 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,23 @@ on:
- main

jobs:

pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.9' # Specify the Python version you need

- name: Install Poetry
uses: Gr1N/setup-poetry@v8
with:
poetry-version: '1.2.2' # Specify the Poetry version you need

- name: Install pre-commit
run: pip install pre-commit
- name: Install dependencies
run: poetry install

- name: Run pre-commit
run: pre-commit run --all-files
run: poetry run pre-commit run --all-files
24 changes: 15 additions & 9 deletions .github/workflows/pytest-actions.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# GitHub Actions Configuration for integrated testing using pytest
name: Test osipi

on: [push]
Expand All @@ -15,28 +14,35 @@ jobs:

steps:
- uses: actions/checkout@v3

- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Set up Java
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'
architecture: x64

- name: Install Poetry
uses: Gr1N/setup-poetry@v8
with:
poetry-version: '1.2.2' # Specify the Poetry version you need

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
run: poetry install

- name: Install osipi
run: |
python -m pip install -e .[docs]
python -m pip install -e .[tests]
poetry install -E docs
poetry install -E tests
- name: Test with pytest
run: |
python -m pip install pytest pytest-cov
pytest --junitxml=junit/test-results.xml --cov=dbdicom tests/
run: poetry run pytest --junitxml=junit/test-results.xml --cov=dbdicom tests/

- name: Upload coverage to Codecov
if: runner.os == 'Windows'
uses: codecov/codecov-action@v3
Loading

0 comments on commit e93dea7

Please sign in to comment.