Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion .github/workflows/sync-master-to-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ jobs:
TAG: ${{ inputs.tag }}
run: |
git fetch origin master dev --tags
test "$(git rev-list -n 1 "$TAG")" = "$(git rev-parse origin/master)"
test "$(git cat-file -t "$TAG")" = "tag"
git merge-base --is-ancestor "$TAG^{}" origin/master
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
git merge --no-ff origin/master -m "Merge released $TAG back into dev"
Expand Down
6 changes: 6 additions & 0 deletions scripts/test_release_workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ def test_production_has_approval_but_no_build_or_keystore(self):
self.assertNotIn("gradlew", workflow)
self.assertNotIn("ANDROID_KEYSTORE", workflow)

def test_master_sync_accepts_post_tag_release_fixes(self):
workflow = self.read("sync-master-to-dev.yml")
self.assertIn('test "$(git cat-file -t "$TAG")" = "tag"', workflow)
self.assertIn('git merge-base --is-ancestor "$TAG^{}" origin/master', workflow)
self.assertNotIn('git rev-list -n 1 "$TAG")" = "$(git rev-parse origin/master)', workflow)

def test_actions_are_versioned(self):
for path in WORKFLOWS.glob("*.yml"):
for action in re.findall(r"uses:\s*([^\s]+)", path.read_text(encoding="utf-8")):
Expand Down