-
Notifications
You must be signed in to change notification settings - Fork 17
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
Improve the CI and the translation in readthedocs #38
Conversation
Allow to run tests without wasting API requests
Avoid a untracked downloaded README in the VCS tree
https://readthedocs.org/api/v2/build/24311043.txt
|
This also drops forcing master. On push or schedule, it will run on master as per event trigger settings. On pull request, it should run in the branch of the pull request.
GHA complained ./locale/update.sh: 8: Bad substitution
I don't see a particular reason for this, and it could prevent other workflows that we could want to be ran.
Centralized build and lint for all languages
The current workflow is already to not commit it. With this entry we save a line in update.sh
This step is required for later deploying a script that removes obsolete resources in Transifex
It did not work for some reason
The update.sh deletes PO files before pulling new translations. Then we have modified files (updated) and deleted (obsolete, nothing pulled). This commit removes from git the deleted files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Thank you very much.
I checked the all GHA operation and found no problems.
I think this PR will allow us to close #16 as well.
I also commented one minor point.
As a side note, I ran it with act' to check the behavior in my local environment. the following adjustments were necessary when using
act' to check the behavior.
- change the matrix in
test-translations.yml
tolanguage: ["ja"]
etc. to have one target language and avoid disk-full. - change apt-get install line to
sudo apt-get update && sudo apt-get install -y graphviz
. - change
make html ...
toTZ=UTC make html ...
to avoid babel error
@AA-Turner Would you like to review this? Asking just to know if I wait or merge |
Replace [[ with [ for POSIX shell compatibility, and check for empty variable (e.g. in own local shell)
This greatly improves the CI workflow of sphinx-doc-translations, by simplify some statements in CI workflow, removing obsolete PO files and removing obsolete Transifex resources.
Notable changes to
main.yml
:generate_templates.sh
(POT and .tx/config generation) andupdates.sh
(tx push and tx pull). This was required for the cleanup of POT and Transifex resources.²locale/lock-translations.py
added to find obsolete resources in Transifex, lock for 3 days (time to a manual check) and then remove the resource if it still locked.³update
New workflow file
test-translations.yml
5:Footnotes:
¹ Example of issue: In pull requests, changes to updates.sh in the branch would not be used because
git checkout master
was changing the current branch during the workflow run, effectively making the workflow use updates.sh from master branch.² locking resources needed POT and .tx/config generated, but not the translations pulled. So splitting seemed to be the best alternative. Other alternative was to set up another GHA job in same file and duplicate lines of statements checkout, dependencies installation, etc.
³ Fixes #40
4 Fixes #42
5 Fixes #41