Skip to content

Commit a8b7ff9

Browse files
Add CI job to check BridgeJS generated files are up-to-date
Adds check-bridgejs-generated job that runs bridge-js-generate.sh and fails if generated files are not current.
1 parent 7814be9 commit a8b7ff9

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

.github/workflows/test.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,23 @@ jobs:
8888
echo "::error::The formatting changed some files. Please run \`./Utilities/format.swift\` and commit the changes."
8989
exit 1
9090
}
91+
92+
check-bridgejs-generated:
93+
runs-on: ubuntu-latest
94+
container:
95+
image: swift:6.1.2
96+
steps:
97+
- uses: actions/checkout@v5
98+
- run: make bootstrap
99+
- run: ./Utilities/bridge-js-generate.sh
100+
- name: Check if BridgeJS generated files are up-to-date
101+
run: |
102+
git config --global --add safe.directory "$GITHUB_WORKSPACE"
103+
git diff --exit-code || {
104+
echo "::error::BridgeJS generated files are out of date. Please run \`./Utilities/bridge-js-generate.sh\` and commit the changes."
105+
exit 1
106+
}
107+
91108
build-examples:
92109
runs-on: ubuntu-latest
93110
steps:

0 commit comments

Comments
 (0)