refactor: simplify CI workflow by using gitea-compatible artifact actions across all platforms
CI / Generate Certificates (push) Successful in 27s
CI / Frontend CI (push) Successful in 1m7s
CI / Backend CI (push) Failing after 48s
CI / E2E Tests (push) Has been skipped

This commit is contained in:
ramvignesh-b
2026-05-05 07:46:41 +05:30
parent a401901ee3
commit dacef9f9e2
+13 -49
View File
@@ -25,17 +25,7 @@ jobs:
mkcert -install
mkcert -cert-file certs/localhost.pem -key-file certs/localhost-key.pem localhost 127.0.0.1 ::1
# WHY?: different configuration for gitea and github becasue of GHES no support check
- name: Upload certificates (GitHub)
if: ${{ github.server_url == 'https://github.com' }}
uses: actions/upload-artifact@v4
with:
name: ssl-certs
path: certs/
retention-days: 1
- name: Upload certificates (Gitea)
if: ${{ github.server_url != 'https://github.com' }}
- name: Upload certificates
uses: christopherHX/gitea-upload-artifact@v4
with:
name: ssl-certs
@@ -53,15 +43,7 @@ jobs:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- name: Download certificates (GitHub)
if: ${{ github.server_url == 'https://github.com' }}
uses: actions/download-artifact@v4
with:
name: ssl-certs
path: certs/
- name: Download certificates (Gitea)
if: ${{ github.server_url != 'https://github.com' }}
- name: Download certificates
uses: christopherHX/gitea-download-artifact@v4
with:
name: ssl-certs
@@ -106,15 +88,7 @@ jobs:
enable-cache: true
cache-dependency-glob: "backend/uv.lock"
- name: Download certificates (GitHub)
if: ${{ github.server_url == 'https://github.com' }}
uses: actions/download-artifact@v4
with:
name: ssl-certs
path: certs/
- name: Download certificates (Gitea)
if: ${{ github.server_url != 'https://github.com' }}
- name: Download certificates
uses: christopherHX/gitea-download-artifact@v4
with:
name: ssl-certs
@@ -124,7 +98,7 @@ jobs:
run: |
cp ../.env.example ../.env
uv sync
# Use internal networking for Gitea
if [ "$GITEA_ACTIONS" = "true" ]; then
export DB_HOST="postgres"
export DB_PORT="5432"
@@ -132,6 +106,7 @@ jobs:
export DB_HOST="127.0.0.1"
export DB_PORT="5442"
fi
uv run ruff check
uv run python manage.py test
@@ -139,19 +114,12 @@ jobs:
name: E2E Tests
runs-on: ubuntu-latest
needs: setup-environment
# Skipping on Gitea pushes until I figure out caching
if: ${{ github.server_url == 'https://github.com' || github.event_name == 'pull_request' }}
steps:
- uses: actions/checkout@v4
- name: Download Certificates (GitHub)
if: ${{ github.server_url == 'https://github.com' }}
uses: actions/download-artifact@v4
with:
name: ssl-certs
path: certs/
- name: Download Certificates (Gitea)
if: ${{ github.server_url != 'https://github.com' }}
- name: Download Certificates
uses: christopherHX/gitea-download-artifact@v4
with:
name: ssl-certs
@@ -159,10 +127,14 @@ jobs:
- 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 about 3mins trying to upload the cache
# TODO: setup cache server in Gitea
if: ${{ github.server_url == 'https://github.com' }}
uses: actions/cache@v4
with:
@@ -184,16 +156,8 @@ jobs:
env:
CI: "true"
- name: Upload Playwright Report (GitHub)
if: always() && ${{ github.server_url == 'https://github.com' }}
uses: actions/upload-artifact@v4
with:
name: playwright-report
path: frontend/playwright-report/
retention-days: 10
- name: Upload Playwright Report (Gitea)
if: always() && ${{ github.server_url != 'https://github.com' }}
- name: Upload Playwright Report
if: always()
uses: christopherHX/gitea-upload-artifact@v4
with:
name: playwright-report