Commit graph

21689 commits

Author SHA1 Message Date
Otto Richter
1f7a648057 tests(e2e): mention highlights in commit messages 2024-11-14 14:12:23 +01:00
Otto Richter
c17b4bdaeb tests(e2e): Separate accessibility and form checks
- automatically test for light and dark themes
2024-11-14 14:08:12 +01:00
0ko
634519e891 feat(ui): highlight user mention in comments and commit messages 2024-11-14 14:08:12 +01:00
Earl Warren
bd42f677b4 Merge pull request 'chore: improve slow tests' (#5954) from gusted/improve-slow-test into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5954
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-11-14 12:37:37 +00:00
Gusted
75a8b83946
chore: improve slow tests
- Optimize generting random files.
- Reduce big file of 128MiB to 32MiB (git was never made for large files
anyways, but simply tests that it works).
- Reduce looped git operations from 100 iterations to 10.
- Add extra print statements to know what a slow test is doing, this
also helps to see if a particular piece of code in a slow test is the
culprit or if the test is just very extensive.
- Set `[ui.notification].EVENT_SOURCE_UPDATE_TIME` to 1s to speed up
`TestEventSourceManagerRun`.
- Sneaked in some general test improvements.
2024-11-14 12:41:11 +01:00
Codeberg Translate
e600fe97a3 i18n: update of translations from Codeberg Translate (#5845)
Co-authored-by: earl-warren <earl-warren@users.noreply.translate.codeberg.org>
Co-authored-by: SomeTr <SomeTr@users.noreply.translate.codeberg.org>
Co-authored-by: artnay <artnay@users.noreply.translate.codeberg.org>
Co-authored-by: Edgarsons <Edgarsons@users.noreply.translate.codeberg.org>
Co-authored-by: raspher <raspher@users.noreply.translate.codeberg.org>
Co-authored-by: 0ko <0ko@users.noreply.translate.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-authored-by: kwoot <kwoot@users.noreply.translate.codeberg.org>
Co-authored-by: Atul_Eterno <Atul_Eterno@users.noreply.translate.codeberg.org>
Co-authored-by: xtex <xtexchooser@duck.com>
Co-authored-by: Benedikt Straub <Nordfriese@users.noreply.translate.codeberg.org>
Co-authored-by: Juno Takano <jutty@users.noreply.translate.codeberg.org>
Co-authored-by: faoquad <faoquad@users.noreply.translate.codeberg.org>
Co-authored-by: Fjuro <fjuro@alius.cz>
Co-authored-by: Atalanttore <Atalanttore@users.noreply.translate.codeberg.org>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5845
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Codeberg Translate <translate@noreply.codeberg.org>
Co-committed-by: Codeberg Translate <translate@noreply.codeberg.org>
2024-11-14 10:20:25 +00:00
Gusted
d1520cf08d
chore: improve preparing tests
- Only prepare repositories once.
- Move the repositories to temporary directories (these should usually be stored in
memory) which are recreated for each test to avoid persistentance
between tests. Doing some dirty profiling suggests that the preparing
test functions from 140-100ms to 70-40ms
2024-11-14 10:07:52 +01:00
Kwonunn
f9169eac96
re-add the string for read-only viewers 2024-11-14 09:47:49 +01:00
Kwonunn
f8cbd6301e
reword the no-workflows page 2024-11-14 09:47:48 +01:00
Gusted
b86f6cae03 Merge pull request 'feat: Make AVIF Images work with Forgejo' (#5940) from JakobDev/forgejo:avif into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5940
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Otto <otto@codeberg.org>
2024-11-14 08:40:53 +00:00
Earl Warren
9e95f80d94 Merge pull request 'chore(i18n): allow datnes nosaukums for filename (Latvian)' (#5951) from earl-warren/forgejo:wip-i18n-filename into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5951
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2024-11-14 08:34:11 +00:00
Earl Warren
c7b0132a78
chore(i18n): allow datnes nosaukums for filename (Latvian) 2024-11-14 08:54:49 +01:00
Renovate Bot
8206d509fc Update module code.forgejo.org/forgejo/act to v1.22.0 2024-11-14 02:03:09 +00:00
Gusted
3fe67dba8b Merge pull request 'Update module github.com/blevesearch/bleve/v2 to v2.4.3 (forgejo)' (#5946) from renovate/forgejo-github.com-blevesearch-bleve-v2-2.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5946
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-11-14 01:22:21 +00:00
Renovate Bot
c0309ee367 Update module github.com/blevesearch/bleve/v2 to v2.4.3 2024-11-14 00:03:01 +00:00
Otto
17ec79ccfc Merge pull request 'fix: handle renamed dependency for cargo registry' (#5941) from gusted/forgejo-renamed-cargo-dep into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5941
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: Otto <otto@codeberg.org>
2024-11-13 22:51:34 +00:00
Earl Warren
a5ba7cadf7
chore(release-notes): update the v9.0.2 & v7.0.11 links 2024-11-13 23:23:47 +01:00
Earl Warren
2581c9cfc8 Merge pull request 'chore(ci): ROLE forgejo-coding & forgejo-testing (part two)' (#5944) from earl-warren/forgejo:wip-testing-only into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5944
2024-11-13 22:21:33 +00:00
Earl Warren
068558accd
chore(ci): ROLE forgejo-coding & forgejo-testing (part two)
When the CI vars.ROLE is forgejo-coding, it is assumed to be the
repository where collaborative coding happens,
i.e. https://codeberg.org/forgejo/forgejo

When the CI vars.ROLE is forgejo-testing, it is assumed that only codebase
testing is to be run and no other tests such as release build
integration, label constraints, backporting etc.
2024-11-13 23:04:47 +01:00
Earl Warren
5562ea4566 Merge pull request 'chore(ci): ROLE forgejo-coding & forgejo-testing' (#5942) from earl-warren/forgejo:wip-testing-only into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5942
Reviewed-by: Otto <otto@codeberg.org>
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-11-13 21:43:48 +00:00
Earl Warren
f82840f1ea
chore(ci): ROLE forgejo-coding & forgejo-testing
When the CI vars.ROLE is forgejo-coding, it is assumed to be the
repository where collaborative coding happens,
i.e. https://codeberg.org/forgejo/forgejo

When the CI vars.ROLE is forgejo-testing, it is assumed that only codebase
testing is to be run and no other tests such as release build
integration, label constraints, backporting etc.
2024-11-13 22:18:35 +01:00
Gusted
bb93d3e6c8
fix: handle renamed dependency for cargo registery
- When a dependency is renamed, specified via `package="actual-name"` in
Cargo.toml, this should become the name of the depedency when the
package is retrieved from the registery by cargo and the old name should
be available in the `package` field.
- The reference implementation also does this: 490e66a9d6/src/controllers/krate/publish.rs (L702-L705)
- Resolves #5936
- Unit test added.
2024-11-13 21:26:49 +01:00
JakobDev
19a27ded86
feat: Make AVIF Images work with Forgejo 2024-11-13 19:09:40 +01:00
Earl Warren
5614719e0a Merge pull request 'chore(release): also copy the release to code.forgejo.org' (#5732) from earl-warren/forgejo:wip-mirror into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5732
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-11-13 16:47:45 +00:00
Earl Warren
7492330721
chore(ci): trigger a mirror when a release is publish
Notify https://code.forgejo.org/forgejo/forgejo that a new release was
published by setting the trigger label to
https://code.forgejo.org/forgejo/forgejo/issues/5.

It is only ever useful when a stable release is published, the
experimental releases are not mirrored. But it is triggered in all
cases. This will waste a few mirror check daily, when experimental
releases are built. This is an improvement compared to the current
situation where mirrors are checked hourly:

* Instead of being checked 24 times per day it will be down to less
  than 5
* The mirror happens immediately after the release is published
  instead of waiting for the next run of the cron job.

If a mirror operation is in progress, as evidenced by the presence of
the trigger label on the issure, it means two releases are being
published. Wait up to 1h for the mirror to complete and remove the
trigger label.
2024-11-13 17:17:08 +01:00
Otto
9c86c4f170 Merge pull request 'tests(e2e): Refactor various tests' (#5929) from fnetx/e2e-flakiness into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5929
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-11-13 14:53:16 +00:00
Earl Warren
e6bddc66ef Merge pull request 'chore(renovate): throttle down upgrade of linters & test packages' (#5935) from earl-warren/forgejo:wip-renovate-tests into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5935
Reviewed-by: Otto <otto@codeberg.org>
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-11-13 14:49:20 +00:00
Otto Richter
40551de313 tests(e2e): Refactor various tests
Goals:

- speedup
- less flakiness
- best practices and more use
- documentation

config:
- sync ports in Makefile and playwright config
  (otherwise, some tests fail locally because they assert the full URL including the (wrong) port)
- even more generous timeouts
- limit workers to one again (because I finally understand how
  Playwright works)
- allow nested functions to group them together with the related test

all:

- deprecate waitForLoadState('networkidle')
  - it is discouraged as per https://playwright.dev/docs/api/class-page#page-wait-for-load-state
  - I could not find a usage that seems to require it actually (see
    added documentation in README)
  - adding an exception should be made explicitly
  - it does not do what you might expect anyway in most cases
- only log in when necessary

webauthn:

- verify that login is possible after disabling key
- otherwise, the cleanup was not necessary after the previous refactor to create a fresh user each

issue-sidebar / WIP toggle:

- split into smaller chunks
- restore original state first
- add missed assertion to fix race condition (not waiting
  before state was reached)
- explicitly toggle the state to detect mismatch earlier

issue-sidebar / labels:

- restore original state first
- better waiting for background request
2024-11-13 13:15:37 +01:00
Gusted
ef3b67757a Merge pull request 'Update module github.com/buildkite/terminal-to-html/v3 to v3.16.4 (forgejo)' (#5922) from renovate/forgejo-github.com-buildkite-terminal-to-html-v3-3.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5922
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-11-13 10:23:24 +00:00
Earl Warren
68658400be
chore(renovate): throttle down upgrade of linters & test packages
Once a month.

* Without throttling multiple test / linter packages are updated every
  day and this exceeds the review capacity of Forgejo contributors at
  the moment. Some of them even release more than once a day,
  apparently on every commit.

* Add @axe-core/playwright
2024-11-13 11:17:57 +01:00
Earl Warren
7ff9bffb0b Merge pull request 'Update dependency @axe-core/playwright to v4.10.1 (forgejo)' (#5919) from renovate/forgejo-axe-core-playwright-4.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5919
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-11-13 07:25:16 +00:00
Renovate Bot
6bfa0ee13b Update dependency @stoplight/spectral-cli to v6.14.0 (forgejo) (#5933)
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2024-11-13 07:23:17 +00:00
Renovate Bot
7a764a2996 Update dependency happy-dom to v15.11.3 (forgejo) (#5932)
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2024-11-13 07:20:12 +00:00
Renovate Bot
10573c6f2b Update dependency @vitest/eslint-plugin to v1.1.9 (forgejo) (#5931)
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2024-11-13 07:18:45 +00:00
Renovate Bot
0aaf9e400f Update linters (forgejo) (#5934)
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2024-11-13 05:45:40 +00:00
Otto
a39f726643 Merge pull request 'chore(lint): Ignore playwright reports for linting' (#5928) from fnetx/nolint into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5928
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-11-12 20:10:19 +00:00
Otto Richter
2e9a8c4fc0 chore(lint): Ignore playwright reports for linting
Was part of c9e402afdc but got dropped from Makefile in 8dc72589ca
There are no JavaScript files in e2e left, so apply some rule to TypeScript only
2024-11-12 20:36:26 +01:00
Gusted
fae9cbc8e6 Merge pull request 'Update dependency postcss to v8.4.49 (forgejo)' (#5921) from renovate/forgejo-postcss into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5921
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-11-12 16:21:16 +00:00
Otto
d248d5dc92 Merge pull request 'chore(renovate): always set the test/not-needed label' (#5923) from earl-warren/forgejo:wip-renovate-test-present into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5923
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Reviewed-by: Otto <otto@codeberg.org>
2024-11-12 15:16:19 +00:00
Earl Warren
164044c070 Merge pull request 'fix(ci): synchronize updates the commit status asynchronously' (#5924) from earl-warren/forgejo:wip-test-commit into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5924
Reviewed-by: Otto <otto@codeberg.org>
2024-11-12 11:52:14 +00:00
Earl Warren
dd6ea5f3c8
chore(renovate): always set the test/not-needed label
Under the assumption that all dependencies have at least some test
coverage. It may not be always true but it is generally true. Ideally
there would be an inventory, a checklist of dependencies that miss
test coverage, but that does not exist.
2024-11-12 12:48:35 +01:00
Earl Warren
983aed4268
fix(ci): synchronize updates the commit status asynchronously
When a new commit is pushed to an existing pull request, the update of
the commit status will happen asynchronously, via the git hook.

   --- FAIL: TestPullRequestCommitStatus/synchronize (2.14s)
        actions_trigger_test.go:331:
            	Error Trace:	/workspace/forgejo/forgejo/tests/integration/actions_trigger_test.go:331
            	Error:      	Should be true
            	Test:       	TestPullRequestCommitStatus/synchronize
2024-11-12 08:13:33 +01:00
Renovate Bot
520a7bca93 Update dependency happy-dom to v15.11.1 (forgejo) (#5920)
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2024-11-12 05:57:01 +00:00
Renovate Bot
58ee2386d7 Update module github.com/buildkite/terminal-to-html/v3 to v3.16.4 2024-11-12 02:04:00 +00:00
Renovate Bot
8f6d20c1a3 Update dependency postcss to v8.4.49 2024-11-12 02:03:17 +00:00
Renovate Bot
9995ca1547 Update dependency @axe-core/playwright to v4.10.1 2024-11-12 00:02:42 +00:00
Otto
1b3497c9c4 Merge pull request 'refactor: Migrate playwright to typescript' (#5734) from anbraten/forgejo:ts-test into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5734
Reviewed-by: Otto <otto@codeberg.org>
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-11-11 16:58:29 +00:00
Otto
a2ef74902f Merge pull request 'chore(e2e): Update global patterns' (#5916) from fnetx/e2e-patterns into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5916
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-11-11 16:49:03 +00:00
Otto Richter
7db3781abf chore(e2e): Update global patterns
Guard against regressions in template classes (see https://codeberg.org/forgejo/forgejo/pulls/5892 for example)
Fix broken frontend test patterns as per https://codeberg.org/forgejo/forgejo/pulls/5734#issuecomment-2406914
2024-11-11 15:23:33 +01:00
Otto
9e929bd709 Merge branch 'forgejo' into ts-test 2024-11-11 14:23:11 +00:00