openai/codex-action
Publicmirrored from https://github.com/openai/codex-actionAvailable
.github/workflows/ci.yml
46lines · modecode
| 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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 |
| 15 | |
| 16 | - name: Setup pnpm |
| 17 | uses: pnpm/action-setup@02f6c237bd2518259fed6c71566509edfb3f2b74 # v4 |
| 18 | with: |
| 19 | run_install: false |
| 20 | |
| 21 | - name: Setup Node.js |
| 22 | uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6 |
| 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: Test |
| 34 | run: pnpm test |
| 35 | |
| 36 | - name: Build bundles |
| 37 | run: pnpm run build |
| 38 | |
| 39 | - name: Ensure dist matches bundled output |
| 40 | run: | |
| 41 | status_output="$(git status --short -- dist)" |
| 42 | if [[ -n "$status_output" ]]; then |
| 43 | echo '::error::Detected modified files in dist/ after running pnpm run build. Please rebuild locally and commit the updated bundles.' |
| 44 | echo "$status_output" |
| 45 | exit 1 |
| 46 | fi |
| 47 | |