diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index 9742687..2f3903d 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -3,7 +3,7 @@ name: Python package -on: [push, pull_request] +on: [ push, pull_request ] jobs: test: @@ -11,32 +11,31 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.9, 3.10, 3.11, 3.12] + python-version: [ "3.9", "3.10", "3.11", "3.12" ] + poetry-version: [ "1.8.2" ] steps: - - uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - name: Cache pip - uses: actions/cache@v2 - with: - path: ~/.cache/pip # This path is specific to Ubuntu - # Look to see if there is a cache hit for the corresponding requirements file - key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}-${{ hashFiles('requirements-dev.txt') }} - - name: Install dependencies - run: | - pip install -U poetry - poetry install - - name: Test with pytest - run: | - PYTHONPATH=$(realpath .) coverage run -m pytest tests - - name: Genrate Coverage Report - run: | - PYTHONPATH=$(realpath .) coverage report - - name: Coveralls - env: - COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} - run: | - coveralls + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Poetry Image + uses: abatilo/actions-poetry@v2 + with: + poetry-version: ${{ matrix.poetry-version }} + - name: Install dependencies + run: | + poetry config virtualenvs.create false + poetry install --no-root + - name: Test with pytest + run: | + PYTHONPATH=$(realpath .) coverage run -m pytest tests + - name: Generate Coverage Report + run: | + PYTHONPATH=$(realpath .) coverage report + - name: Coverage comment + id: coverage_comment + uses: py-cov-action/python-coverage-comment-action@v3 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.idea/GitCommitMessageStorage.xml b/.idea/GitCommitMessageStorage.xml new file mode 100644 index 0000000..e4fd56a --- /dev/null +++ b/.idea/GitCommitMessageStorage.xml @@ -0,0 +1,8 @@ + + + + + + \ No newline at end of file diff --git a/.idea/git_toolbox_prj.xml b/.idea/git_toolbox_prj.xml new file mode 100644 index 0000000..02b915b --- /dev/null +++ b/.idea/git_toolbox_prj.xml @@ -0,0 +1,15 @@ + + + + + + + \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 3c129de..113a081 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,3 +20,6 @@ mypy = "^1.8.0" [build-system] requires = ["poetry-core"] build-backend = "poetry.core.masonry.api" + +[tool.coverage.run] +relative_files = true