feat: added build/test pipeline
CI / test (push) Failing after 6s
CI / build (push) Has been skipped

This commit is contained in:
2026-07-16 14:55:07 +02:00
parent 903d016330
commit ba7b8a9f97
12 changed files with 262 additions and 3 deletions
+49
View File
@@ -0,0 +1,49 @@
name: CI
on:
push:
branches: [master]
defaults:
run:
shell: sh
jobs:
test:
runs-on: ubuntu-latest
container:
image: python:3.13-bookworm
steps:
- name: Checkout
run: |
git clone https://git.spookydev.com/${{ gitea.repository }}.git .
git checkout ${{ gitea.sha }}
- name: Install uv
run: pip install uv --quiet
- name: Install dependencies
run: uv pip install -r pyproject.toml --group=dev
- name: Run tests
run: uv run pytest
build:
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout
run: |
git clone https://git.spookydev.com/${{ gitea.repository }}.git .
git checkout ${{ gitea.sha }}
- name: Build and push
run: |
docker build -t registry.spookydev.com/${{ gitea.repository }}:${{ gitea.sha }} .
docker tag registry.spookydev.com/${{ gitea.repository }}:${{ gitea.sha }} \
registry.spookydev.com/${{ gitea.repository }}:latest
docker login registry.spookydev.com \
-u ${{ secrets.REGISTRY_USER }} \
-p ${{ secrets.REGISTRY_PASSWORD }}
docker push registry.spookydev.com/${{ gitea.repository }}:${{ gitea.sha }}
docker push registry.spookydev.com/${{ gitea.repository }}:latest