fix: make setup compatible with Codex normalized Role config #118
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| name: ${{ matrix.os }} / Node ${{ matrix.node }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| node: [22.13.0, lts/*] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| cache: npm | |
| - run: npm ci | |
| - name: Enforce LF line endings | |
| run: npm run check:line-endings | |
| - run: npm run check | |
| - name: Clean packed production install and Node 22.13 native binding smoke | |
| run: node --test tests/integration/package-install.test.mjs | |
| - name: Production lockfile native binding smoke | |
| shell: bash | |
| run: | | |
| # Windows test brokers intentionally retain their process/native | |
| # addon for the documented 30-second idle window. If npm's cleanup | |
| # races that window, retry once after it has elapsed. | |
| if ! npm ci --omit=dev; then | |
| if [[ "$RUNNER_OS" != "Windows" ]]; then exit 1; fi | |
| echo "npm ci raced an idle Windows broker; retrying after 35 seconds" | |
| sleep 35 | |
| npm ci --omit=dev | |
| fi | |
| node -e "const fs=require('node:fs'),os=require('node:os'),path=require('node:path'),lock=require('fs-native-extensions');const dir=fs.mkdtempSync(path.join(os.tmpdir(),'zcode-lock-'));const file=fs.openSync(path.join(dir,'smoke.lock'),'a+');if(!lock.tryLock(file))throw new Error('native lock unavailable');lock.unlock(file);fs.closeSync(file);fs.rmSync(dir,{recursive:true});" |