Skip to content
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
72 changes: 38 additions & 34 deletions .github/workflows/main-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,19 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: 3.11

- name: Install & configure poetry
run: |
python -m pip install poetry==1.7.1
python -m poetry config virtualenvs.in-project true

- name: Configure Poetry
uses: snok/install-poetry@v1
with:
version: 1.7.1
virtualenvs-create: true
virtualenvs-in-project: true

- name: Cache poetry virtualenv
uses: actions/cache@v4
with:
path: ./.venv
key: ${{ runner.os }}-venv-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-venv-

- name: Install poetry dependencies
run: |
Expand All @@ -52,7 +52,6 @@ jobs:
.
!.git
!.github
!.venv
!node_modules
verify:
needs: setup
Expand All @@ -69,30 +68,28 @@ jobs:
uses: actions/download-artifact@v4
with:
name: workspace

- name: Set up python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.11

- name: Install & configure poetry
run: |
python -m pip install poetry==1.7.1
python -m poetry config virtualenvs.in-project true

- name: Cache poetry virtualenv

- name: Configure Poetry
uses: snok/install-poetry@v1
with:
version: 1.7.1
virtualenvs-create: true
virtualenvs-in-project: true

- name: Cache virtualenv
uses: actions/cache@v4
with:
path: ./.venv
key: ${{ runner.os }}-venv-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-venv-

- name: Install dependencies
run: python -m poetry install


- name: Run ${{ matrix.task }}
run: python -m poetry run ${{ matrix.command }}
run: |
poetry run ${{ matrix.command }}

test:
needs: setup
Expand All @@ -112,13 +109,18 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Install & configure poetry
run: |
python -m pip install poetry==1.7.1
python -m poetry config virtualenvs.in-project true
- name: Configure Poetry
uses: snok/install-poetry@v1
with:
version: 1.7.1
virtualenvs-create: true
virtualenvs-in-project: true

- name: Install dependencies
run: python -m poetry install
- name: Cache virtualenv
uses: actions/cache@v4
with:
path: ./.venv
key: ${{ runner.os }}-venv-${{ hashFiles('**/poetry.lock') }}

- name: Run tests
run: python -m poetry run make test
Expand Down Expand Up @@ -159,11 +161,13 @@ jobs:
with:
python-version: 3.11

- name: Install poetry
- name: Configure Poetry
if: steps.release.outputs.released == 'true'
run: |
python -m pip install poetry==1.7.1
python -m poetry config virtualenvs.in-project true
uses: snok/install-poetry@v1
with:
version: 1.7.1
virtualenvs-create: true
virtualenvs-in-project: true

- name: Configure poetry credentials
if: steps.release.outputs.released == 'true'
Expand Down
58 changes: 32 additions & 26 deletions .github/workflows/pull-request-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,22 @@ jobs:
with:
python-version: 3.11

- name: Install & configure poetry
run: |
python -m pip install poetry==1.7.1
python -m poetry config virtualenvs.in-project true
- name: Configure Poetry
uses: snok/install-poetry@v1
with:
version: 1.7.1
virtualenvs-create: true
virtualenvs-in-project: true

- name: Cache poetry virtualenv
- name: Cache virtualenv
uses: actions/cache@v4
with:
path: ./.venv
key: ${{ runner.os }}-venv-${{ hashFiles('**/poetry.lock') }}

- name: Install poetry dependencies
- name: Install dependencies
run: |
python -m poetry install
poetry install

- name: Upload workspace
uses: actions/upload-artifact@v4
Expand All @@ -43,8 +45,8 @@ jobs:
.
!.git
!.github
!.venv
!node_modules
!.venv

verify:
needs: setup
Expand All @@ -67,23 +69,22 @@ jobs:
with:
python-version: 3.11

- name: Install & configure poetry
run: |
python -m pip install poetry==1.7.1
python -m poetry config virtualenvs.in-project true
- name: Configure Poetry
uses: snok/install-poetry@v1
with:
version: 1.7.1
virtualenvs-create: true
virtualenvs-in-project: true

- name: Cache poetry virtualenv
- name: Cache virtualenv
uses: actions/cache@v4
with:
path: ./.venv
key: ${{ runner.os }}-venv-${{ hashFiles('**/poetry.lock') }}

- name: Install dependencies
run: python -m poetry install

- name: Run ${{ matrix.task }}
run: python -m poetry run ${{ matrix.command }}
timeout-minutes: 5
run: |
poetry run ${{ matrix.command }}

test:
needs: setup
Expand All @@ -102,17 +103,22 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Configure Poetry
uses: snok/install-poetry@v1
with:
version: 1.7.1
virtualenvs-create: true
virtualenvs-in-project: true

- name: Install & configure poetry
run: |
python -m pip install poetry==1.7.1
python -m poetry config virtualenvs.in-project true

- name: Install dependencies
run: python -m poetry install
- name: Cache virtualenv
uses: actions/cache@v4
with:
path: ./.venv
key: ${{ runner.os }}-venv-${{ hashFiles('**/poetry.lock') }}

- name: Run tests
run: python -m poetry run make test
run: poetry run make test
timeout-minutes: 5

semantic-release-dry-run:
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ generate: clean
python scripts/generate_schemas.py

test:
pytest
python -m pytest

lint:
flake8 --statistics
python -m flake8 --statistics

fix:
black --line-length 120 .
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ pydantic = "^2.10"
python-dateutil = "^2.9"
requests = "^2.32"


[tool.poetry.group.dev.dependencies]
openapi-generator-cli = "^7.10.0.post0"
pytest = "^8.3.4"
Expand Down
Loading