Skip to content

chore(deps): update pre-commit hook charliermarsh/ruff-pre-commit to v0.0.269 #394

chore(deps): update pre-commit hook charliermarsh/ruff-pre-commit to v0.0.269

chore(deps): update pre-commit hook charliermarsh/ruff-pre-commit to v0.0.269 #394

Workflow file for this run

name: CI/CD
on:
push:
branches: [main]
pull_request:
branches: [main]
release:
types: [created]
permissions:
contents: read
env:
PYTHON_VERSION: "3.11"
jobs:
code-quality:
name: Check code quality
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install poetry
run: pipx install poetry
- uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
cache: poetry
- name: Install dependencies
run: |
poetry env use ${{ env.PYTHON_VERSION }}
poetry install --only main,ci
- name: Check code quality
run: poetry run poe ci
run-tests:
name: Run tests
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Install poetry
run: pipx install poetry
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: poetry
- name: Install dependencies
run: |
poetry env use ${{ matrix.python-version }}
poetry install --only main,test
- name: Run tests
run: poetry run pytest --cov-report=xml -m "not key_required"
env:
UPLOADCARE_KEY: ${{ secrets.UPLOADCARE_KEY }}
- name: Upload coverage to Codecov
if: matrix.os == 'ubuntu-latest' && matrix.python-version == env.PYTHON_VERSION
uses: codecov/codecov-action@v3
publish-pypi:
name: Build and release to PyPI
if: github.event_name == 'release' && github.event.action == 'created'
needs: [code-quality, run-tests]
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v3
- name: Install poetry
run: |
pipx install poetry
pipx inject poetry poetry-dynamic-versioning[plugin]
- uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Build package
run: poetry build
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
publish-aur:
name: Release to AUR
if: "!github.event.release.prerelease"
needs: [publish-pypi]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Update version
run: |
VERSION="${GITHUB_REF#refs/tags/v}"
sed -i "s|\(^pkgver=\).*$|\1\"${VERSION}\"|" ./PKGBUILD
- name: Deploy PKGBUILD to the Arch User Repository
uses: KSXGitHub/github-actions-deploy-aur@v2
with:
pkgname: python-images-upload-cli
pkgbuild: ./PKGBUILD
commit_username: DeadNews
commit_email: uhjnnn@gmail.com
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
commit_message: Upstream release ${{github.ref}}
updpkgsums: true