Commit graph

16 commits

Author SHA1 Message Date
nicole mikołajczyk
8c619d51b5 [chore] bump golangci-lint version in CI, disable var-naming package name checks (#4372)
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>

# Description

This PR bumps golangci-lint used by CI to the latest version and partially disables the `var-naming` rule, which complains about the `common` and `util` package names.

## Checklist

- [x] I/we have read the [GoToSocial contribution guidelines](https://codeberg.org/superseriousbusiness/gotosocial/src/branch/main/CONTRIBUTING.md).
- [ ] I/we have discussed the proposed changes already, either in an issue on the repository, or in the Matrix chat.
- [x] I/we have not leveraged AI to create the proposed changes.
- [ ] I/we have performed a self-review of added code.
- [ ] I/we have written code that is legible and maintainable by others.
- [ ] I/we have commented the added code, particularly in hard-to-understand areas.
- [ ] I/we have made any necessary changes to documentation.
- [ ] I/we have added tests that cover new code.
- [ ] I/we have run tests and they pass locally with the changes.
- [ ] I/we have run `go fmt ./...` and `golangci-lint run`.

Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4372
Co-authored-by: nicole mikołajczyk <git@mkljczk.pl>
Co-committed-by: nicole mikołajczyk <git@mkljczk.pl>
2025-08-21 15:57:25 +02:00
tobi
e565855540 [chore] pin to go 1.24.6 (#4364)
Pins our Go version to v1.24.6 for bugfixes etc.

Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4364
Co-authored-by: tobi <tobi.smethurst@protonmail.com>
Co-committed-by: tobi <tobi.smethurst@protonmail.com>
2025-08-11 16:04:29 +02:00
nicole mikołajczyk
5717ce6f3c [chore] upgrade golangci-lint to v2.1.6 and migrate config (#4265)
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>

# Description

Contribution guidelines link to the golangci-lint documentation for the up-to-date version rather than [the legacy v1 doc](https://golangci.github.io/legacy-v1-doc/), which uses a different configuration schema. I migrated the config using the `golangci-lint migrate` command, moved the comments, adjusted staticcheck config and ensured the rules still work.

## Checklist

- [x] I/we have read the [GoToSocial contribution guidelines](https://codeberg.org/superseriousbusiness/gotosocial/src/branch/main/CONTRIBUTING.md).
- [ ] I/we have discussed the proposed changes already, either in an issue on the repository, or in the Matrix chat.
- [x] I/we have not leveraged AI to create the proposed changes.
- [ ] I/we have performed a self-review of added code.
- [x] I/we have written code that is legible and maintainable by others.
- [ ] I/we have commented the added code, particularly in hard-to-understand areas.
- [ ] I/we have made any necessary changes to documentation.
- [ ] I/we have added tests that cover new code.
- [ ] I/we have run tests and they pass locally with the changes.
- [ ] I/we have run `go fmt ./...` and `golangci-lint run`.

Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4265
Co-authored-by: nicole mikołajczyk <git@mkljczk.pl>
Co-committed-by: nicole mikołajczyk <git@mkljczk.pl>
2025-06-13 15:45:35 +02:00
tobi
20aad9be0f [chore/woodpecker] don't make test depend on lint (#4189)
Just remove the dependency `test` has on `lint`, as it's not actually dependent on it, and has different triggers.

Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4189
Co-authored-by: tobi <tobi.smethurst@protonmail.com>
Co-committed-by: tobi <tobi.smethurst@protonmail.com>
2025-05-22 15:54:58 +02:00
Daenney
d5c9c4adc1 [chore] Upgrade to Go 1.24 (#4187)
* Set `go.mod` to 1.24 now that it's been out for 3 months.
* Update all the test to use `testing.T.Context()`.

Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4187
Co-authored-by: Daenney <git@noreply.sourcery.dny.nu>
Co-committed-by: Daenney <git@noreply.sourcery.dny.nu>
2025-05-22 12:26:11 +02:00
tobi
5925644ad3 [chore] Update woodpecker to catch len(fromJSON(CI_PIPELINE_FILES)) == 0 (#4177)
This'll hopefully catch some straggler occurrences of the tests not wanting to run.

Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4177
Co-authored-by: tobi <tobi.smethurst@protonmail.com>
Co-committed-by: tobi <tobi.smethurst@protonmail.com>
2025-05-13 11:23:30 +00:00
tobi
ad71066973 [chore] Update goreleaser (#4133)
Updates gotosocial-woodpecker-build to a version that includes goreleaser v2.9.0, which should work properly with "gitea" aka forgejo (ie., codeberg).

Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4133
Co-authored-by: tobi <tobi.smethurst@protonmail.com>
Co-committed-by: tobi <tobi.smethurst@protonmail.com>
2025-05-05 14:18:21 +00:00
tobi
056c67f396 [chore/cicd] Account for force pushes in conditional runs (#4121)
CI_PIPELINE_FILES seems to be empty on force pushes to an open pull request, so this PR just accounts for that and runs all steps if it's the case, as we can't tell then what's actually changed.

Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4121
Co-authored-by: tobi <tobi.smethurst@protonmail.com>
Co-committed-by: tobi <tobi.smethurst@protonmail.com>
2025-05-04 07:58:17 +00:00
tobi
6c87918635 [chore/cicd] Snapshot only if source code files have changed (#4115)
See https://codeberg.org/superseriousbusiness/gotosocial/issues/4113, follow up to https://codeberg.org/superseriousbusiness/gotosocial/pulls/4114

Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4115
Co-authored-by: tobi <tobi.smethurst@protonmail.com>
Co-committed-by: tobi <tobi.smethurst@protonmail.com>
2025-05-02 20:35:49 +00:00
tobi
bf10ca0203 [chore/cicd] conditional tests + linting for pull requests (#4114)
Closes https://codeberg.org/superseriousbusiness/gotosocial/issues/4113

Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4114
Co-authored-by: tobi <tobi.smethurst@protonmail.com>
Co-committed-by: tobi <tobi.smethurst@protonmail.com>
2025-05-02 20:26:09 +00:00
tobi
90f5004db0 [chore] Update release CICD to point at "gitea" (#4100)
Updates our release flow to point at "gitea", which should work for Codeberg as well.

Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4100
Co-authored-by: tobi <tobi.smethurst@protonmail.com>
Co-committed-by: tobi <tobi.smethurst@protonmail.com>
2025-04-30 12:10:09 +00:00
tobi
457ca3c9d3 [chore] Update build to use new woodpecker dind container, bump version numbers (#4073)
As described!

Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4073
Co-authored-by: tobi <tobi.smethurst@protonmail.com>
Co-committed-by: tobi <tobi.smethurst@protonmail.com>
2025-04-28 09:31:51 +00:00
tobi
7dae3364fa [chore] Override woodpecker plugin for snapshot + release to get tags (#4069)
We need tags to do snapshots + releases properly! Another cheeky little difference from drone.

Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4069
Co-authored-by: tobi <tobi.smethurst@protonmail.com>
Co-committed-by: tobi <tobi.smethurst@protonmail.com>
2025-04-27 22:07:59 +00:00
tobi
8bc0b06105 [chore] Fix CI/CD snapshot / release (#4068)
🤦

Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4068
Co-authored-by: tobi <tobi.smethurst@protonmail.com>
Co-committed-by: tobi <tobi.smethurst@protonmail.com>
2025-04-27 21:33:39 +00:00
Daenney
93c3c153f0 [chore] Rewrite all remaining Github links 2025-04-27 13:40:22 +02:00
tobi
5bfccdad3c [chore] add woodpecker ci/cd pipelines (#4061)
Removes our now unused drone stuff and adds pipelines for our new woodpecker instance.

Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4061
Co-authored-by: tobi <tobi.smethurst@protonmail.com>
Co-committed-by: tobi <tobi.smethurst@protonmail.com>
2025-04-27 11:22:35 +00:00