mirror of
https://github.com/go-gitea/gitea.git
synced 2026-02-23 00:03:37 +01:00
Remove the Go test harness that compiled test binaries and bootstrapped a full Gitea server with fixtures. Replace with a bash script that runs Playwright directly against an already-running Gitea instance. - Remove Go e2e test files (e2e_test.go, utils_e2e_test.go) - Add tools/test-e2e.sh that detects server URL, creates e2e user, runs Playwright - Simplify Makefile to single test-e2e target - Rewrite playwright.config.ts with chromium-only, no file outputs - Rewrite tests using semantic Playwright locators (getByLabel, getByRole, getByText) - Add login/logout utilities in tests/e2e/utils.ts - Add CI workflow for e2e tests (.github/workflows/pull-e2e-tests.yml) - Install only chromium in playwright install step Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
57 lines
1.4 KiB
YAML
57 lines
1.4 KiB
YAML
name: e2e-tests
|
|
|
|
on:
|
|
pull_request:
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
files-changed:
|
|
uses: ./.github/workflows/files-changed.yml
|
|
permissions:
|
|
contents: read
|
|
|
|
test-e2e:
|
|
if: needs.files-changed.outputs.backend == 'true' || needs.files-changed.outputs.frontend == 'true'
|
|
needs: files-changed
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- uses: actions/setup-go@v6
|
|
with:
|
|
go-version-file: go.mod
|
|
check-latest: true
|
|
- uses: pnpm/action-setup@v4
|
|
- uses: actions/setup-node@v6
|
|
with:
|
|
node-version: 24
|
|
cache: pnpm
|
|
cache-dependency-path: pnpm-lock.yaml
|
|
- run: make deps-backend
|
|
- run: make backend
|
|
env:
|
|
TAGS: bindata sqlite sqlite_unlock_notify
|
|
- run: make deps-frontend
|
|
- run: make frontend
|
|
- run: make playwright
|
|
- run: |
|
|
mkdir -p custom/conf
|
|
cat <<'EOF' > custom/conf/app.ini
|
|
[database]
|
|
DB_TYPE = sqlite3
|
|
|
|
[server]
|
|
HTTP_PORT = 3000
|
|
ROOT_URL = http://localhost:3000
|
|
|
|
[security]
|
|
INSTALL_LOCK = true
|
|
EOF
|
|
- run: ./gitea web &
|
|
- run: GITEA_URL=http://localhost:3000 make test-e2e
|
|
timeout-minutes: 10
|