From b1cee1baac31199d8b0a3216720f93d82a507002 Mon Sep 17 00:00:00 2001 From: Artur Shiriev Date: Thu, 30 Jan 2025 10:19:20 +0300 Subject: [PATCH] add uv community workflow --- .github/workflows/ci.yml | 51 ---------------------------------- .github/workflows/publish.yml | 20 ------------- .github/workflows/workflow.yml | 19 +++++++++++++ 3 files changed, 19 insertions(+), 71 deletions(-) delete mode 100644 .github/workflows/ci.yml delete mode 100644 .github/workflows/publish.yml create mode 100644 .github/workflows/workflow.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 3e3771f..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,51 +0,0 @@ -name: main - -on: - push: - branches: - - main - pull_request: {} - -concurrency: - group: ${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: extractions/setup-just@v2 - - uses: astral-sh/setup-uv@v3 - with: - enable-cache: true - cache-dependency-glob: "**/pyproject.toml" - - run: uv python install 3.10 - - run: just install lint-ci - - pytest: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - python-version: - - "3.10" - - "3.11" - - "3.12" - - "3.13" - steps: - - uses: actions/checkout@v4 - - uses: extractions/setup-just@v2 - - uses: astral-sh/setup-uv@v3 - with: - enable-cache: true - cache-dependency-glob: "**/pyproject.toml" - - run: uv python install ${{ matrix.python-version }} - - run: just install test . --cov=. --cov-report xml - - uses: codecov/codecov-action@v4.0.1 - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - with: - files: ./coverage.xml - flags: unittests - name: codecov-${{ matrix.python-version }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml deleted file mode 100644 index c0699ac..0000000 --- a/.github/workflows/publish.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Publish Package - -on: - release: - types: - - published - -jobs: - publish: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: extractions/setup-just@v2 - - uses: astral-sh/setup-uv@v3 - with: - enable-cache: true - cache-dependency-glob: "**/pyproject.toml" - - run: just publish - env: - PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml new file mode 100644 index 0000000..59dafa8 --- /dev/null +++ b/.github/workflows/workflow.yml @@ -0,0 +1,19 @@ +name: CI Pipeline + +on: + push: + branches: + - main + pull_request: + branches: + - main + release: + types: + - published + +jobs: + ci: + uses: community-of-python/community-workflow/.github/workflows/preset_uv.yml@main + with: + python-version: '["3.10","3.11","3.12","3.13"]' + secrets: inherit