mirror of
https://github.com/go-gitea/gitea.git
synced 2026-04-27 11:38:46 +00:00
Cache includes go, lint and unittests. Integration tests with their standalone binaries are uncacheable with their current architecture. Every Go job uses a new composite action (`.github/actions/go-cache`) that restores and saves the Go module cache, a shared build cache, and the golangci-lint cache. A `cache-seeder` workflow runs on `push: main` to pre-populate those slots; PRs read them via GitHub's default-branch fallback, so the common case is warm from the first commit. Also dropped `-coverprofile` from `test-unit` (it silently disabled Go's test result cache), and `-race` from `test-pgsql` and `test-mysql` (kept on `test-unit` and `test-sqlite`). Signed-off-by: silverwind <me@silverwind.io> Co-authored-by: Claude (Opus 4.7) <noreply@anthropic.com> Co-authored-by: Nicolas <bircni@icloud.com>
49 lines
1.2 KiB
YAML
49 lines
1.2 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.outputs.e2e == '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
|
|
cache: false
|
|
- uses: ./.github/actions/go-cache
|
|
with:
|
|
cache-name: e2e
|
|
build-cache: "false"
|
|
- uses: pnpm/action-setup@v5
|
|
- uses: actions/setup-node@v6
|
|
with:
|
|
node-version: 24
|
|
cache: pnpm
|
|
cache-dependency-path: pnpm-lock.yaml
|
|
- run: make deps-frontend
|
|
- run: make frontend
|
|
- run: make deps-backend
|
|
- run: make gitea-e2e
|
|
- run: make playwright
|
|
- run: make test-e2e
|
|
timeout-minutes: 10
|
|
env:
|
|
FORCE_COLOR: 1
|
|
GITEA_TEST_E2E_DEBUG: 1
|