diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3542af116..bc0c4d166 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -71,3 +71,28 @@ jobs: cache: "npm" - run: npm ci - run: npx prettier --check . + + gen-maps: + name: 🗺️ Generated maps up to date + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - uses: actions/checkout@v6 + - uses: actions/setup-node@v6 + with: + node-version: "24" + cache: "npm" + - uses: actions/setup-go@v6 + with: + go-version-file: map-generator/go.mod + cache-dependency-path: map-generator/go.sum + - run: npm ci + - run: npm run gen-maps + - name: Check for diff + run: | + if [ -n "$(git status --porcelain)" ]; then + echo "::error::Generated maps are out of date — run 'npm run gen-maps' and commit the result." + git status --short + git --no-pager diff + exit 1 + fi