ci: add GitHub and Gitea workflows for version tag releases
Some checks failed
Test and Build / test (push) Failing after 48s
Test and Build / build (push) Has been skipped

Workflows trigger on v*.*.* tags, run tests with pytest, and build
Docker image tagged with version number.
This commit is contained in:
2025-11-30 18:22:55 -05:00
parent 4c56c059c7
commit 7344991347
2 changed files with 100 additions and 0 deletions

View File

@@ -0,0 +1,49 @@
name: Test and Build
on:
push:
tags:
- 'v*.*.*'
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v4
- name: Set up Python
run: uv python install 3.12
- name: Install dependencies
run: uv sync
- name: Install FFmpeg
run: sudo apt-get update && sudo apt-get install -y ffmpeg
- name: Run tests
run: uv run pytest tests/ -v --ignore=tests/test_integration.py
build:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Extract version from tag
id: version
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
- name: Build Docker image
uses: docker/build-push-action@v6
with:
context: .
push: false
tags: |
ffmpeg-worker:${{ steps.version.outputs.VERSION }}
ffmpeg-worker:latest

51
.github/workflows/release.yml vendored Normal file
View File

@@ -0,0 +1,51 @@
name: Test and Build
on:
push:
tags:
- 'v*.*.*'
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v4
- name: Set up Python
run: uv python install 3.12
- name: Install dependencies
run: uv sync
- name: Install FFmpeg
run: sudo apt-get update && sudo apt-get install -y ffmpeg
- name: Run tests
run: uv run pytest tests/ -v --ignore=tests/test_integration.py
build:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Extract version from tag
id: version
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
- name: Build Docker image
uses: docker/build-push-action@v6
with:
context: .
push: false
tags: |
ffmpeg-worker:${{ steps.version.outputs.VERSION }}
ffmpeg-worker:latest
cache-from: type=gha
cache-to: type=gha,mode=max