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

Feat: check makemessages #2155

Merged
merged 3 commits into from
Jun 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Check for up-to-date Django migrations
name: Check for up-to-date Django migrations and messages
on: [push, pull_request]

jobs:
check-makemigrations:
check-migrations-and-messages:
runs-on: ubuntu-latest
steps:
- name: Check out code
Expand All @@ -26,7 +26,23 @@ jobs:
run: |
if ./bin/makemigrations.sh | grep -q 'No changes detected';
then
exit 0;
exit 0;
else
exit 1;
exit 1;
fi

- name: Run ./bin/makemessages.sh
run: |
./bin/makemessages.sh

set -x # show commands

git add benefits

# message files are up-to-date if the only differences are from the updated timestamp
if echo $(git diff --cached --shortstat) | grep -q '2 files changed, 2 insertions(+), 2 deletions(-)';
then
exit 0;
else
exit 1;
fi
Loading