Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub Actions enhancements for frontend #25150

Merged
merged 11 commits into from
Jun 14, 2023
Merged

Conversation

silverwind
Copy link
Member

@silverwind silverwind commented Jun 8, 2023

  • Don't run DB tests for frontend-only changes
  • Build frontend as part of frontend step
  • Build everything when actions change

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jun 8, 2023
@pull-request-size pull-request-size bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jun 8, 2023
@silverwind silverwind added skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. backport/v1.20 This PR should be backported to Gitea 1.20 topic/build PR changes how Gitea is built, i.e. regarding Docker or the Makefile labels Jun 8, 2023
@lunny
Copy link
Member

lunny commented Jun 8, 2023

Those tests in fact are integration tests which will be affected by page HTML changes.
But we should split API integration tests and Web integration tests. The API integration tests will not depend on frontend changes.

@silverwind
Copy link
Member Author

silverwind commented Jun 8, 2023

Those tests in fact are integration tests which will be affected by page HTML changes.

frontend here means only JS and CSS, and I don't think any of these integration DB tests are actually influenced by JS and CSS. When HTML templates change, the DB tests will be triggered as normally because .tmpl is matched for backend.

@silverwind silverwind changed the title GitHub Actions enhancements GitHub Actions enhancements for frontend Jun 8, 2023
@silverwind
Copy link
Member Author

I will push and later revert a change to frontend just to confirm that it runs correctly.

@silverwind
Copy link
Member Author

Frontend run was fine, now doing the backend one.

This reverts commit ff74fe3.
@silverwind
Copy link
Member Author

All looking good from my side

@silverwind
Copy link
Member Author

silverwind commented Jun 9, 2023

I guess we should actually run a full build when actions workflow files change because those changes can affect the whole build of course.

@pull-request-size pull-request-size bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jun 9, 2023
@silverwind
Copy link
Member Author

I guess we should actually run a full build when actions workflow files change because those changes can affect the whole build of course.

Done in 4272c78. When actions themselves change, everything has to run, so I added the condition everywhere.

@lunny what do you think? I think the frontend removal will save us a lot of unnecessary CI time for JS/CSS changes which have no influence on the backend/db tests.

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Jun 9, 2023
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Jun 14, 2023
@lunny lunny added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Jun 14, 2023
@lunny lunny merged commit 4c290e9 into go-gitea:main Jun 14, 2023
@GiteaBot GiteaBot added this to the 1.21.0 milestone Jun 14, 2023
GiteaBot pushed a commit to GiteaBot/gitea that referenced this pull request Jun 14, 2023
- Don't run DB tests for frontend-only changes
- Build frontend as part of frontend step
- Build everything when actions change
@GiteaBot GiteaBot added backport/done All backports for this PR have been created and removed reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. labels Jun 14, 2023
@silverwind silverwind deleted the actions-enh branch June 14, 2023 15:35
silverwind added a commit that referenced this pull request Jun 14, 2023
Backport #25150 by @silverwind

- Don't run DB tests for frontend-only changes
- Build frontend as part of frontend step
- Build everything when actions change

Co-authored-by: silverwind <me@silverwind.io>
zjjhot added a commit to zjjhot/gitea that referenced this pull request Jun 15, 2023
* upstream/main: (31 commits)
  Show OAuth2 errors to end users (go-gitea#25261)
  [skip ci] Updated translations via Crowdin
  Fix index generation parallelly failure (go-gitea#25235)
  Fix variable in template (go-gitea#25267)
  Add template linting via djlint (go-gitea#25212)
  Fix edit OAuth application width (go-gitea#25262)
  Use flex to align SVG and text (go-gitea#25163)
  GitHub Actions enhancements for frontend (go-gitea#25150)
  Add missing `v` in migrations.go (go-gitea#25252)
  Change form actions to fetch for submit review box (go-gitea#25219)
  Fix panic when migrating a repo from GitHub with issues (go-gitea#25246)
  Fix description of drop custom_labels migration (go-gitea#25243)
  Fix all possible setting error related storages and added some tests (go-gitea#23911)
  [skip ci] Updated translations via Crowdin
  Revert overflow: overlay (revert go-gitea#21850) (go-gitea#25231)
  Support changing labels of Actions runner without re-registration (go-gitea#24806)
  Improve AJAX link and modal confirm dialog (go-gitea#25210)
  Use inline SVG for built-in OAuth providers (go-gitea#25171)
  Disable `Create column` button while the column name is empty  (go-gitea#25192)
  Fix profile render when the README.md size is larger than 1024 bytes (go-gitea#25131)
  ...
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Sep 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/done All backports for this PR have been created backport/v1.20 This PR should be backported to Gitea 1.20 lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. topic/build PR changes how Gitea is built, i.e. regarding Docker or the Makefile
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants