Skip to content
Open
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
18 changes: 6 additions & 12 deletions .github/workflows/code-quality.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,14 @@ jobs:

if: github.ref != 'refs/heads/main'
steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v4
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}

- name: Install Poetry and dependencies
run: |
set -e

curl -sSL https://install.python-poetry.org | python3 -
poetry install --all-extras

- name: Install Poetry
uses: snok/install-poetry@v1
- name: Install dataclasses-json
run: poetry install --all-extras
- uses: reviewdog/action-setup@v1

- name: run mypy
run: poetry run mypy --no-warn-no-return dataclasses_json
49 changes: 21 additions & 28 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,27 +22,25 @@ jobs:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Install Poetry and dependencies
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: >-
${{
matrix.python-version == '3.7' && '1.5.1'
|| (matrix.python-version == '3.8' && '1.8.5'
|| (matrix.python-version == '3.9' && '2.2.1'
|| 'latest'))
}}
- name: Install dataclasses-json
shell: bash
env:
PYTHON_VERSION: ${{ matrix.python-version }}
run: |
set -e

if [[ "$PYTHON_VERSION" == '3.7' ]]
then
curl -sSL https://install.python-poetry.org | python3 - --version 1.5.1
else
curl -sSL https://install.python-poetry.org | python3 -
fi

poetry install --all-extras
run: poetry install --all-extras
- name: Lint with flake8
run: |
set -e
Expand All @@ -52,7 +50,6 @@ jobs:
set -euxo pipefail

poetry run pytest ./tests --doctest-modules --junitxml=junit/test-results.xml --cov=. --cov-report=term-missing:skip-covered | tee pytest-coverage.txt

- name: Publish Code Coverage
uses: MishaKav/pytest-coverage-comment@main
if: ${{ !github.event.pull_request.head.repo.fork }}
Expand All @@ -69,28 +66,24 @@ jobs:
permissions:
id-token: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v6
with:
python-version: "3.9.x"
- name: Install Poetry and Prepare version
run: |
set -e

curl -sSL https://install.python-poetry.org | python3 -
poetry self add "poetry-dynamic-versioning[plugin]"
python-version: "3.10"
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Prepare version
run: poetry self add "poetry-dynamic-versioning[plugin]"
- name: Build package
run: |
set -e

poetry build

- name: Publish distribution 📦 to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/

- name: Publish distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1