Skip to content
Merged
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
81 changes: 81 additions & 0 deletions .github/workflows/egg-pytest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: egg-pytest
permissions:
contents: read

on:
- pull_request
- push

env:
PYTHON_LATEST_VERSION: '3.14'

jobs:
pytest:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
python-version: ['3.11', '3.12', '3.13', '3.14']

steps:
- uses: actions/checkout@v6

- uses: astral-sh/setup-uv@v7
with:
python-version: ${{ matrix.python-version }}
enable-cache: true

- name: dependencies
working-directory: egg
run: uv sync --locked --extra dev

- name: pytest
working-directory: egg
run: uv run pytest

build:
runs-on: ubuntu-latest
needs: pytest

if: "github.event_name == 'push' && startsWith(github.ref, 'refs/tags')"

steps:
- uses: actions/checkout@v6

- name: recovery tag information
run: git fetch --tags --force

- uses: astral-sh/setup-uv@v7
with:
python-version: ${{ env.PYTHON_LATEST_VERSION }}
enable-cache: true

- name: build
working-directory: egg
run: uv build

- uses: actions/upload-artifact@v6
with:
name: dist
path: egg/dist/*.whl

upload:
runs-on: ubuntu-latest
needs: build

environment:
name: pypi-egg
url: https://pypi.org/project/apyds-egg
permissions:
id-token: write

steps:
- uses: actions/download-artifact@v7
with:
name: dist
path: dist

- uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: dist