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
55 changes: 18 additions & 37 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,56 +3,37 @@ on: [push]

jobs:
test:
strategy:
fail-fast: false
matrix:
python-version: [3.10.9]
poetry-version: [1.2.2]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python-version }}
- name: Run image
uses: abatilo/[email protected]
with:
poetry-version: ${{ matrix.poetry-version }}
python-version: "3.12"
- name: Install dependencies
run: poetry install
run: uv sync
- name: Run tests
run: poetry run pytest --cov=./ --cov-report=xml
run: uv run pytest --cov=./ --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v4

code-quality:
strategy:
fail-fast: false
matrix:
python-version: [3.10.9]
poetry-version: [1.2.2]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Run image
uses: abatilo/[email protected]
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
with:
poetry-version: ${{ matrix.poetry-version }}
python-version: "3.12"
- name: Install dependencies
run: poetry install
run: uv sync
- name: Run black
run: poetry run black . --check
run: uv run black . --check
- name: Run isort
run: poetry run isort . --check-only --profile black
run: uv run isort . --check-only --profile black
- name: Run flake8
run: poetry run flake8 .
run: uv run flake8 .
- name: Run bandit
run: poetry run bandit .
run: uv run bandit .
# - name: Run safety
# env:
# SAFETY_API_KEY: ${{ secrets.SAFETY_API_KEY }}
# run: poetry run safety check --key $SAFETY_API_KEY
# run: uv run safety check --key $SAFETY_API_KEY
26 changes: 8 additions & 18 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,15 @@ on:

jobs:
publish:
strategy:
fail-fast: false
matrix:
python-version: ['3.10']
poetry-version: ['1.2.2']
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python-version }}
- name: Run image
uses: abatilo/[email protected]
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Publish
python-version: "3.12"
- name: Build and publish
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: |
poetry config pypi-token.pypi $PYPI_TOKEN
poetry publish --build
uv build
uv publish
Loading
Loading