Commit Graph

22 Commits (2ab5f05f40d93224f73e211e84de50a88a6ecf03)

Author SHA1 Message Date
silverwind 2ab5f05f40
Add svg linter and fix incorrect svgs (#30086)
Fixes https://github.com/go-gitea/gitea/issues/30082.

Adds a new linter that searches for non-existant SVG images in
templates. Output before the fix was:

```
$ make lint-templates
SVG "octicon-warning" not found, used in templates/devtest/flex-list.tmpl
SVG "octicon-warning" not found, used in templates/devtest/flex-list.tmpl
SVG "octicon-markup" not found, used in templates/repo/diff/comment_form.tmpl
make: *** [Makefile:438: lint-templates] Error 1
```

<img width="306" alt="Screenshot 2024-03-25 at 23 31 05"
src="https://github.com/go-gitea/gitea/assets/115237/1052d1a9-bfec-4d5a-9cae-f895f78f7c93">
2 months ago
silverwind efa631aeea
Update js and py dependencies, bump python (#29561)
- Update js and py dependencies excluding `@mcaptcha/vanilla-glue`,
`eslint-plugin-array-func`
- Update stylelint config
- Require python 3.10 and use 3.12 on CI, bump setup-python as well
- Tested markdown toolbar, charts, clipboard, swagger ui, vue
3 months ago
silverwind 9c39f8515f
Rework spellchecking, add `lint-spell` (#29106)
- Use maintained fork https://github.com/golangci/misspell
- Rename `mispell-check` to `lint-spell`, add `lint-spell-fix`
- Run `lint-spell` in separate actions step
- Lint more files, fix discovered issues
- Remove inaccurate and outdated info in docs (we do not need GOPATH for
tools anymore)

Maybe later we can add more spellchecking tools, but I have not found
any good ones yet.
4 months ago
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>
5 months ago
Chongyi Zheng 0a710133cd
Bump workflows in github actions (#27836)
All major version upgrades are related to using Node v20 as default
runtime
7 months ago
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.
8 months ago
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>
9 months ago
silverwind 3c0c279658
Add `yamllint` (#26965)
So that https://github.com/go-gitea/gitea/pull/26964 does not happen
again. Merge this after that PR. Config is based on
[node's](https://github.com/nodejs/node/blob/main/.yamllint.yaml).

---------

Co-authored-by: techknowlogick <techknowlogick@gitea.com>
9 months ago
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.
10 months ago
John Olheiser bd4c7ce578
Docusaurus-ify (#26051)
This PR cleans up the docs in a way to make them simpler to ingest by
our [docs repo](https://gitea.com/gitea/gitea-docusaurus).

1. It includes all of the sed invocations our ingestion did, removing
the need to do it at build time.
2. It replaces the shortcode variable replacement method with
`@variable@` style, simply for easier sed invocations when required.
3. It removes unused files and moves the docs up a level as cleanup.

---------

Signed-off-by: jolheiser <john.olheiser@gmail.com>
10 months ago
silverwind fdf71460f9
Fix `lint-swagger` action (#25593)
- Add detection for swagger changes and run `lint-swagger` on it
- Remove `lint-swagger` from `lint-frontend`
- Remove `lint-md` from `lint-frontend`
11 months ago
silverwind 478f33030e
Remove `deps-tools` from `backend` job (#25454) 12 months ago
silverwind 6281ebfec3
add `test-frontend` back to actions (#25452)
Apparently we were not running `test-frontend` on actions, this adds it
back.
12 months ago
silverwind e24f651c86
Add template linting via djlint (#25212)
So I found this [linter](https://github.com/Riverside-Healthcare/djlint)
which features a mode for go templates, so I gave it a try and it did
find a number of valid issue, like unbalanced tags etc. It also has a
number of bugs, I had to disable/workaround many issues.

Given that this linter is written in python, this does add a dependency
on `python` >= 3.8 and `poetry` to the development environment to be
able to run this linter locally.

- `e.g.` prefixes on placeholders are removed because the linter had a
false-positive on `placeholder="e.g. cn=Search"` for the `attr=value`
syntax and it's not ideal anyways to write `e.g.` into a placeholder
because a placeholder is meant to hold a sample value.
- In `templates/repo/settings/options.tmpl` I simplified the logic to
not conditionally create opening tags without closing tags because this
stuff confuses the linter (and possibly the reader as well).
12 months ago
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
12 months ago
silverwind d783384c19
Clean up github actions (#24984)
- Merge the file filters into `files-changed.yml`
- Remove unused yaml anchors like `&backend`
- Merge the `compliance-docs` workflow into `compliance`
- Add actions linting
- Misc cleanups for whitespace and step names
1 year ago
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>
1 year ago
Lunny Xiao c78b923822
Don't run build and test if only docs changed (#24530)
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
1 year ago
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>
1 year ago
Lunny Xiao 0deb5053bd
Check latest version on CI (#24556) 1 year ago
silverwind 0ca1958e1a
Upgrade to Node 20 on CI, enable actions cancellation (#24524)
- Upgrade node, the
[snap](7abe958f5b/snap/snapcraft.yaml (L47))
is excluded from this because [there is no Node 20 snap
yet](https://snapcraft.io/node).
- Add actions build cancellation based on
[this](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-using-a-fallback-value).

---------

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
1 year ago
techknowlogick f7f0782132
Use Actions for DB & E2E tests (#24494)
following https://github.com/go-gitea/gitea/pull/24314 and
https://github.com/go-gitea/gitea/pull/24434, this PR moves drone cron
pipelines to (GitHub) Actions. As these are mostly compatible with Gitea
Actions, when we start to dogfood, these will already be migrated.

---------

Co-authored-by: silverwind <me@silverwind.io>
1 year ago