Skip to content

Conversation

@quachtridat
Copy link
Collaborator

@quachtridat quachtridat commented Oct 30, 2025

This commit basically brings in
SFUAnime/Ren#673 to replace the existing cog unit test GHA (GitHub Actions) workflow.

This commit is identical to the said pull request, except:

  • The dpy2 branch is the only branch that this workflow will get triggered on.
  • The cogs relative path is set to . because the repo (bearing this commit) has cogs at its root level.
  • The Red bot version extraction is done differently here because there is no setup.py or anything of the Red bot repo in this cog repo. The workflow file has a FALLBACK_BOT_VERSION environment variable set to 3.5.0, and the info.json file at the root level of the repo has a JSON key min_bot_version set to value "3.5.0" as well. This ensures that the Red bot version is at least defined somewhere logical and sensible to maintainers. See https://docs.discord.red/en/stable/guide_publish_cogs.html for more details about min_bot_version. This field is supposed to be defined for cogs only, not for cog repos, but at the very least, it is a good central place to define the Red bot version for the cog repo.

This commit basically brings in
SFUAnime/Ren#673 to replace the existing
cog unit test GHA (GitHub Actions) workflow.

This commit is identical to the said pull request, except:
- The `master` branch is the only branch that this workflow will
  get triggered on.
- The cogs relative path is set to `.` because the repo (bearing
  this commit) has cogs at its root level.
There is no `setup.py` so this commit adds a new field
`min_bot_version` in `info.json` and also adds a fallback version
of "3.4.0" in the workflow file iself.

See https://docs.discord.red/en/stable/guide_publish_cogs.html
for more details about `min_bot_version`. This field is supposed
to be defined for cogs only, not for cog repos, but at the very
least, it is a good central place to define the Red bot version
for the cog repo.
This change fixes the cog unit test GHA workflow by adding the path
`"info.json"` as a positional argument to the `jq` command in the
"extract Red version" step.
This commit fixes it by correcting the text output to
`$GITHUB_OUTPUT` as it has to be in the form of `key=value`.
It was initially 3.4.0 just because the commit stack was brought
over from the `master` branch meant for Red <3.5.0.
It was initially `master` just because the commit stack was brought
over from the `master` branch.
The Pytest version required by Red bot 3.5.0 only supports `-c` and
does not support `--config-file`.
@quachtridat quachtridat requested a review from Injabie3 October 30, 2025 06:40
@quachtridat quachtridat merged commit 4258096 into Injabie3:dpy2 Oct 30, 2025
17 checks passed
@quachtridat quachtridat deleted the github-ci-refactor-dpy2 branch October 30, 2025 06:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant