Skip to content

Test and Release Template #3

Test and Release Template

Test and Release Template #3

Workflow file for this run

name: Test and Release
on:
push:
branches:
- testing
tags:
- 'v*-test'
- 'v[0-9]+.[0-9]+.[0-9]+'
workflow_dispatch:
jobs:
test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
python-version: [ "3.13" ]
steps:
- uses: actions/checkout@v4
- name: Install uv and set Python version.
uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python-version }}
- name: Run tests - ${{ matrix.python-version }} - ${{ matrix.os }}
run: |
uv run pytest
release:
name: GitHub Release
runs-on: ubuntu-latest
needs: test
if: |
github.ref_type == 'tag' &&
startsWith(github.ref, 'refs/tags/v') &&
!endsWith(github.ref, '-test') &&
success()
steps:
- uses: actions/checkout@v4
- name: Install uv and set Python version.
uses: astral-sh/setup-uv@v5
with:
python-version: "3.13"