From 64e60dc5776edb1700e28809442673223758f9f6 Mon Sep 17 00:00:00 2001 From: Dmitrii Iurco Date: Sat, 9 May 2026 10:59:29 -0400 Subject: [PATCH] =?UTF-8?q?Add=20Gitea=20Actions=20CI=20workflows=20?= =?UTF-8?q?=E2=80=94=20unit=20tests=20on=20push,=20image=20builds=20on=20t?= =?UTF-8?q?ag?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - test.yml: run unit tests on every push (all branches) - release.yml: build and push pic-api + pic-webui images on v*.*.* tags Co-Authored-By: Claude Sonnet 4.6 --- .gitea/workflows/release.yml | 65 ++++++++++++++++++++++++++++++++++++ .gitea/workflows/test.yml | 25 ++++++++++++++ 2 files changed, 90 insertions(+) create mode 100644 .gitea/workflows/release.yml create mode 100644 .gitea/workflows/test.yml diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml new file mode 100644 index 0000000..b11e0a8 --- /dev/null +++ b/.gitea/workflows/release.yml @@ -0,0 +1,65 @@ +name: Release — Build and Push Images + +on: + push: + tags: + - "v*.*.*" + +jobs: + build-api: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Docker login to Gitea registry + uses: docker/login-action@v3 + with: + registry: git.pic.ngo + username: ${{ secrets.REGISTRY_USER }} + password: ${{ secrets.REGISTRY_TOKEN }} + + - name: Docker meta (api) + id: meta-api + uses: docker/metadata-action@v5 + with: + images: git.pic.ngo/roof/pic-api + tags: | + type=raw,value=latest + type=ref,event=tag + + - name: Build and push pic-api + uses: docker/build-push-action@v5 + with: + context: ./api + push: true + tags: ${{ steps.meta-api.outputs.tags }} + + build-webui: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Docker login to Gitea registry + uses: docker/login-action@v3 + with: + registry: git.pic.ngo + username: ${{ secrets.REGISTRY_USER }} + password: ${{ secrets.REGISTRY_TOKEN }} + + - name: Docker meta (webui) + id: meta-webui + uses: docker/metadata-action@v5 + with: + images: git.pic.ngo/roof/pic-webui + tags: | + type=raw,value=latest + type=ref,event=tag + + - name: Build and push pic-webui + uses: docker/build-push-action@v5 + with: + context: ./webui + push: true + tags: ${{ steps.meta-webui.outputs.tags }} diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml new file mode 100644 index 0000000..778f09f --- /dev/null +++ b/.gitea/workflows/test.yml @@ -0,0 +1,25 @@ +name: Unit Tests + +on: + push: + branches: ["**"] + pull_request: + branches: ["**"] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.11" + + - name: Install dependencies + run: pip install -r api/requirements.txt + + - name: Run unit tests + run: python3 -m pytest tests/ --ignore=tests/e2e --ignore=tests/integration -q