Merge pull request #89 from icon-project/support-python-13 #82
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: unittest and publish to pypi | |
| on: | |
| push: | |
| branches: ["master"] | |
| pull_request: | |
| branches: ["master"] | |
| release: | |
| types: [published] | |
| jobs: | |
| unittest: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: | |
| - "3.9" | |
| - "3.10" | |
| - "3.11" | |
| - "3.12" | |
| - "3.13" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv and setup Python ${{ matrix.python-version }} | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Run Test | |
| run: | | |
| uv run --frozen pytest | |
| deploy: | |
| needs: unittest | |
| if: ${{ github.event_name == 'release' }} | |
| runs-on: ubuntu-latest | |
| environment: release | |
| permissions: | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| python-version: "3.9" | |
| - name: Install dependencies | |
| run: | | |
| uv sync --all-groups | |
| - name: Build package | |
| run: | | |
| uv build | |
| - name: Publish package | |
| run: | | |
| uv publish |