0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-02-23 17:15:57 +01:00

26 Commits

Author SHA1 Message Date
silverwind
f6037c90d3
Rework e2e test setup for full isolation
Always start an isolated ephemeral Gitea instance with its own temp
directory, SQLite database, and config file. This addresses review
feedback that using the developer's existing instance is unreliable.

- Rewrite test-e2e.sh to create a temp workdir, find a free port,
  write a minimal app.ini, start the server, and clean up on exit
- Build a separate gitea-e2e binary using TEST_TAGS (includes sqlite)
- Simplify CI workflow: remove manual app.ini, server start, and
  redundant build steps
- Rename all env vars to use GITEA_TEST_E2E_* prefix
- Rename test user from "e2e" to "e2e-user"

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 03:59:33 +01:00
silverwind
1e010377f8
Pass TAGS to test-e2e to prevent binary rebuild without SQLite
The `make test-e2e` target depends on $(EXECUTABLE), and the Makefile
detects tag changes via TAGS_PREREQ. Without passing TAGS, the binary
gets rebuilt without SQLite support, causing the e2e user creation to
fail.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 03:03:16 +01:00
silverwind
e9e676d553
Address e2e review feedback
- Add ENABLE_CAPTCHA=false to CI app.ini so the server starts with
  CAPTCHA disabled instead of relying on env var in test script
- Retry on 502/503 in addition to 500 in apiRetry helper
- Fix typo: workarkound → workaround
- Add comment about section-unaware INI parsing in test-e2e.sh

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 03:03:15 +01:00
silverwind
6ea6c37762
enable color on CI 2026-02-18 03:03:15 +01:00
silverwind
4a0366d696
Split playwright install back into separate make target
Restore make playwright as a separate target so CI can run it as its
own step before test-e2e.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 03:03:15 +01:00
silverwind
83a448c498
Rename e2e env vars to E2E_URL, simplify URL detection
Rename GITEA_TEST_SERVER_URL and GITEA_URL to E2E_URL for consistency
with E2E_USER and E2E_PASSWORD. Simplify the if/else in test-e2e.sh.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 03:03:15 +01:00
silverwind
af481926f4
Remove make playwright step from e2e CI workflow
The playwright target was inlined into test-e2e, so the separate
step is no longer needed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 03:03:15 +01:00
silverwind
f76c0acf59
Rework e2e tests
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>
2026-02-18 03:03:15 +01:00
silverwind
66707bc3ea
Fix actions lint (#36029)
actionlint since https://github.com/rhysd/actionlint/releases/tag/v1.7.9
detects constant conditions and this workflow was being disabled in
58d2a87c6c
by such a condition which made the lint fail:


https://github.com/go-gitea/gitea/actions/runs/19673752806/job/56349128912?pr=36028

Instead, remove the whole workflow file. I'm sure we can re-create it if
the need arises.

Also, I locked the actionlint dependency to prevent similar surprises in
the future.
2025-11-26 10:13:37 -08:00
silverwind
96102c69e7
Bump setup-go to v6 (#35660) 2025-10-14 14:28:05 -04:00
silverwind
912515e63a
Bump actions/checkout to v5 (#35644) 2025-10-12 18:01:42 +00:00
silverwind
4d43d85941
Bump setup-node to v5 (#35448)
See https://github.com/actions/setup-node/releases/tag/v5.0.0

Caching is now enabled by default when `packageManager` is present in
package.json, and we have that. `cache-dependency-path` is unneccesary
because the action will automatically detect it.
2025-09-10 16:11:14 +00:00
techknowlogick
361e59fd53
Switch to pnpm (#35274)
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: silverwind <me@silverwind.io>
2025-09-04 01:17:14 +00:00
silverwind
dcc9206a59
Raise minimum Node.js version to 20, test on 24 (#34713)
- Node.js 18 is now EOL, so raise minimum version to current LTS v20
- Test on 24
- Change devcontainers to use LTS version (currently 22),
[ref](https://github.com/devcontainers/features/tree/main/src/node)
2025-06-13 13:40:39 -04:00
wxiaoguang
58d2a87c6c
update go&js dependencies (#34262) 2025-04-23 21:22:40 +00:00
silverwind
9880c1372e
Bump CI,Flake and Snap to Node 22 (#32487)
Node 22 is LTS since 2024-10-29. Updated it everywhere.

---------

Co-authored-by: techknowlogick <techknowlogick@gitea.com>
2024-11-13 21:39:55 +00:00
silverwind
acfe29fc2b
Enable npm cache on setup-node action (#30577)
Enable npm dependency cache in
[setup-node](https://github.com/actions/setup-node). This should work
reliably and across branches as well.
2024-04-19 03:29:08 +00:00
Rui Chen
caceb43313
feat: bump dessant/lock-threads and actions/setup-go to use nodejs20 runtime (#28565)
Update more actions to use nodejs20 runtime and also update the docs for
checkout action usage.

similar to:
- #27836
- #27096

---------

Signed-off-by: Rui Chen <rui@chenrui.dev>
2023-12-21 13:31:04 +08:00
Chongyi Zheng
0a710133cd
Bump workflows in github actions (#27836)
All major version upgrades are related to using Node v20 as default
runtime
2023-10-30 15:56:43 +08:00
Yevhen Pavlov
d98c863884
actions/setup-go use go-version-file (#27651)
These changes will allow not to specify the version of go in every
pipeline.
2023-10-17 10:24:54 +00:00
puni9869
5e039b0580
Upgrading the actions/checkout@4 (#27096)
as title
..Upgrading the actions/checkout@4

Signed-off-by: puni9869 <punitinani1@hotmail.com>
Co-authored-by: silverwind <me@silverwind.io>
2023-09-16 15:06:27 +00:00
silverwind
1772814605
Lock go to 1.21 on CI (#26433)
To prevent unwanted surprises with new minor versions of go, lock the
version to minor version using [semver tilde
syntax](https://github.com/npm/node-semver#tilde-ranges-123-12-1). We
were already getting 1.21.0 since yesterday, so use that version now as
minimum.
2023-08-10 21:53:44 +00:00
silverwind
4c290e9209
GitHub Actions enhancements for frontend (#25150)
- Don't run DB tests for frontend-only changes
- Build frontend as part of frontend step
- Build everything when actions change
2023-06-14 23:30:37 +08:00
Lunny Xiao
93c6a9a652
Use file filters action instead of Github's files filter (#24877)
Inspired by
https://github.com/go-gitea/gitea/pull/24530#issuecomment-1558815301

This PR use a file filter action to do different CI jobs according
changed files types. All types are defined in
`.github/file-filters.yml`. Now there are 4 types, `docs`, `backend`,
`frontend` and `build`. Then if a PR only changed docs files, those CI
jobs which passed the conditions will run, and other types are also like
this.

---------

Co-authored-by: silverwind <me@silverwind.io>
2023-05-25 01:33:31 +00:00
Lunny Xiao
c78b923822
Don't run build and test if only docs changed (#24530)
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2023-05-16 02:53:18 +00:00
silverwind
6c8b680f91
GitHub Actions cleanups (#24620)
- Remove actions name where command is descriptive enough
- Use kebab-case instead of snake-case for step names
- Use shorter job names because to make PR checks more readable
- Remove duplicate `checks-backend`

---------

Co-authored-by: Yarden Shoham <git@yardenshoham.com>
2023-05-11 21:21:28 -04:00