mirror of
https://github.com/kevinveenbirkenbach/docker-volume-backup-cleanup.git
synced 2025-12-31 04:29:08 +00:00
- migrate to pyproject.toml and pip installation - introduce cleanback CLI entrypoint - add unit and Docker-based end-to-end tests - unify GitHub Actions CI and stable tagging - remove legacy tests.yml and pkgmgr requirements https://chatgpt.com/share/69517d20-f850-800f-b6ff-6b983247888f
66 lines
1.3 KiB
YAML
66 lines
1.3 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: ["**"]
|
|
tags:
|
|
- "v*"
|
|
pull_request:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: ci-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
test:
|
|
name: Tests (unit + e2e)
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v6
|
|
with:
|
|
python-version: "3.12"
|
|
|
|
- name: Upgrade pip
|
|
run: python -m pip install -U pip
|
|
|
|
- name: Install project (editable)
|
|
run: python -m pip install -e .
|
|
|
|
- name: Run tests
|
|
run: make test
|
|
|
|
tag-stable:
|
|
name: Tag stable on version tag
|
|
runs-on: ubuntu-latest
|
|
needs: [test]
|
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
steps:
|
|
- name: Checkout (full history for tags)
|
|
uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Configure git user
|
|
run: |
|
|
git config user.name "github-actions[bot]"
|
|
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
|
|
- name: Force-update stable tag to this commit
|
|
env:
|
|
SHA: ${{ github.sha }}
|
|
run: |
|
|
git tag -f stable "${SHA}"
|
|
git push -f origin stable
|