CI/gitiea ci compatibility (#1)
CI / Generate Certificates (push) Successful in 26s
CI / Frontend CI (push) Successful in 1m16s
CI / Backend CI (push) Successful in 1m9s
CI / E2E Tests (push) Has been skipped

Co-authored-by: me <ramvignesh-b@github.com>
Co-authored-by: ramvignesh-b <ramvignesh-b@github.com>
Reviewed-on: #1
This commit was merged in pull request #1.
This commit is contained in:
2026-05-05 14:46:00 +00:00
parent c7764952d8
commit 740753cb33
2 changed files with 50 additions and 23 deletions
+38 -23
View File
@@ -19,11 +19,12 @@ jobs:
mkcert -install
mkcert -cert-file certs/localhost.pem -key-file certs/localhost-key.pem localhost 127.0.0.1 ::1
- name: Cache certificates
uses: actions/cache/save@v4
- name: Upload certificates
uses: christopherHX/gitea-upload-artifact@v4
with:
path: certs
key: certs-${{ runner.os }}-${{ github.sha }}
name: ssl-certs
path: certs/
retention-days: 1
frontend:
name: Frontend CI
@@ -37,10 +38,10 @@ jobs:
- uses: oven-sh/setup-bun@v2
- name: Restore certificates
uses: actions/cache/restore@v4
uses: christopherHX/gitea-download-artifact@v4
with:
path: certs
key: certs-${{ runner.os }}-${{ github.sha }}
name: ssl-certs
path: certs/
- name: Install dependencies
run: bun install --frozen-lockfile
@@ -61,15 +62,15 @@ jobs:
runs-on: ubuntu-latest
needs: setup-environment
services:
postgres:
db:
image: postgres:16-alpine
env:
POSTGRES_DB: piku
POSTGRES_USER: user
POSTGRES_DB: piku__test
POSTGRES_USER: test
POSTGRES_PASSWORD: password123
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
- 5442:5432
options: --tmpfs /var/lib/postgresql/data --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
defaults:
run:
working-directory: ./backend
@@ -82,18 +83,28 @@ jobs:
cache-dependency-glob: "backend/uv.lock"
- name: Restore certificates
uses: actions/cache/restore@v4
uses: christopherHX/gitea-download-artifact@v4
with:
path: certs
key: certs-${{ runner.os }}-${{ github.sha }}
name: ssl-certs
path: certs/
- name: Setup Environment
- name: Setup & Test
run: |
cp ../.env.example ../.env
uv sync
- name: Lint & Test
run: |
export DB_NAME="piku__test"
export DB_USER="test"
export DB_PASSWORD="password123"
if [ "$GITEA_ACTIONS" = "true" ]; then
export DB_HOST="db"
export DB_PORT="5432"
else
export DB_HOST="127.0.0.1"
export DB_PORT="5442"
fi
uv run ruff check
uv run python manage.py test
@@ -101,23 +112,27 @@ jobs:
name: E2E Tests
runs-on: ubuntu-latest
needs: setup-environment
# Skipping on Gitea pushes until cache server is configured
if: github.server_url == 'https://github.com' || github.event_name == 'pull_request'
steps:
- uses: actions/checkout@v4
- name: Restore Certificates
uses: actions/cache/restore@v4
uses: christopherHX/gitea-download-artifact@v4
with:
path: certs
key: certs-${{ runner.os }}-${{ github.sha }}
name: ssl-certs
path: certs/
- name: Setup Tools
uses: astral-sh/setup-uv@v5
- uses: oven-sh/setup-bun@v2
- name: Cache Playwright
id: playwright-cache
# Disable cache when not using GitHub Actions because the runner spends ~3mins trying to upload the cache and failing
# TODO: setup cache server in Gitea
if: github.server_url == 'https://github.com'
uses: actions/cache@v4
with:
path: ~/.cache/ms-playwright
@@ -140,7 +155,7 @@ jobs:
- name: Upload Playwright Report
if: always()
uses: actions/upload-artifact@v4
uses: christopherHX/gitea-upload-artifact@v4
with:
name: playwright-report
path: frontend/playwright-report/