openai/codex-action
Publicmirrored from https://github.com/openai/codex-actionAvailable
.github/workflows/ci.yml
43lines · modeblame
e9d0a695Michael Bolin10 months ago | 1 | name: Verify TypeScript Build |
| 2 | | |
| 3 | on: | |
| 4 | pull_request: | |
| 5 | push: | |
| 6 | branches: | |
| 7 | - main | |
| 8 | | |
| 9 | jobs: | |
| 10 | verify: | |
| 11 | runs-on: ubuntu-latest | |
| 12 | steps: | |
| 13 | - name: Checkout repository | |
| 14 | uses: actions/checkout@v5 | |
| 15 | | |
| 16 | - name: Setup pnpm | |
| 17 | uses: pnpm/action-setup@v4 | |
| 18 | with: | |
| 19 | run_install: false | |
| 20 | | |
| 21 | - name: Setup Node.js | |
| 22 | uses: actions/setup-node@v5 | |
| 23 | with: | |
| 24 | node-version: 22 | |
| 25 | cache: "pnpm" | |
| 26 | | |
| 27 | - name: Install dependencies | |
| 28 | run: pnpm install --frozen-lockfile | |
| 29 | | |
| 30 | - name: Typecheck | |
| 31 | run: pnpm run check | |
| 32 | | |
| 33 | - name: Build bundles | |
| 34 | run: pnpm run build | |
| 35 | | |
| 36 | - name: Ensure dist matches bundled output | |
| 37 | run: | | |
bb1bceceMichael Bolin9 months ago | 38 | status_output="$(git status --short -- dist)" |
| 39 | if [[ -n "$status_output" ]]; then | |
e9d0a695Michael Bolin10 months ago | 40 | echo '::error::Detected modified files in dist/ after running pnpm run build. Please rebuild locally and commit the updated bundles.' |
bb1bceceMichael Bolin9 months ago | 41 | echo "$status_output" |
e9d0a695Michael Bolin10 months ago | 42 | exit 1 |
| 43 | fi |