ci(gitea): shared composite actions + pipeline generator for Gitea Actions
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AqpXh3hQMMaC74pTjFq4it Gitea 1.25 cannot run reusable workflows (workflow_call), so the logic of deploy-app.yml, smoke.yml and ci.yml moves into composite actions under .gitea/actions/, and each repo gets a thin pipeline rendered by tools/gitea-pipeline/render.py from repos.json. .github/workflows is left untouched (Gitea ignores it once .gitea/workflows exists).
This commit is contained in:
70
.gitea/actions/smoke/action.yml
Normal file
70
.gitea/actions/smoke/action.yml
Normal file
@@ -0,0 +1,70 @@
|
||||
name: Smoke tests (staging)
|
||||
description: >-
|
||||
Playwright smoke suite from peptide-e2e against staging. Gitea port of
|
||||
smoke.yml. Checks peptide-e2e out into .peptide-e2e so it never clobbers the
|
||||
caller's checkout. Uses upload-artifact@v3 (Gitea does not support v4).
|
||||
|
||||
inputs:
|
||||
base_url:
|
||||
required: false
|
||||
default: https://staging.peptiderepo.com
|
||||
wp_admin_user:
|
||||
required: true
|
||||
wp_admin_password:
|
||||
required: true
|
||||
e2e_ref:
|
||||
required: false
|
||||
default: main
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Checkout peptide-e2e
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: peptide-repo/peptide-e2e
|
||||
ref: ${{ inputs.e2e_ref }}
|
||||
path: .peptide-e2e
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '22'
|
||||
cache: npm
|
||||
cache-dependency-path: .peptide-e2e/package-lock.json
|
||||
|
||||
- name: Install dependencies
|
||||
shell: bash
|
||||
working-directory: .peptide-e2e
|
||||
run: npm ci
|
||||
|
||||
- name: Install Playwright browsers
|
||||
# OS deps are pre-installed on the runner host; --with-deps needs sudo.
|
||||
shell: bash
|
||||
working-directory: .peptide-e2e
|
||||
run: npx playwright install chromium
|
||||
|
||||
- name: Run smoke tests
|
||||
shell: bash
|
||||
working-directory: .peptide-e2e
|
||||
env:
|
||||
BASE_URL: ${{ inputs.base_url }}
|
||||
WP_ADMIN_USER: ${{ inputs.wp_admin_user }}
|
||||
WP_ADMIN_PASSWORD: ${{ inputs.wp_admin_password }}
|
||||
run: npx playwright test
|
||||
|
||||
- name: Upload test report
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: playwright-report
|
||||
path: .peptide-e2e/playwright-report/
|
||||
retention-days: 14
|
||||
|
||||
- name: Upload failure screenshots/videos
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: playwright-failures
|
||||
path: .peptide-e2e/test-results/
|
||||
retention-days: 7
|
||||
Reference in New Issue
Block a user