ci.yaml
1 name: CI 2 3 on: 4 push: 5 branches: 6 - master 7 pull_request: 8 workflow_dispatch: 9 10 env: 11 node_version: 22.12.0 12 13 permissions: 14 id-token: write 15 16 jobs: 17 test: 18 runs-on: ubuntu-latest 19 env: 20 URL: "http://localhost:8081/api/codex/v1/debug/info" 21 TIMEOUT_SECONDS: 300 22 SLEEP_INTERVAL: 2 23 24 steps: 25 - uses: actions/checkout@v4 26 27 - uses: actions/setup-node@v4 28 with: 29 node-version: ${{ env.node_version }} 30 registry-url: "https://registry.npmjs.org" 31 32 - run: npm ci 33 34 # - name: Start codex-factory 35 # run: npx codex-factory start latest & 36 37 # - name: Wait for first SP to be started 38 # run: | 39 # MAX_RETRIES=$((TIMEOUT_SECONDS / SLEEP_INTERVAL)) 40 # echo "Waiting for $URL (timeout: ${TIMEOUT_SECONDS}s)..." 41 42 # for i in $(seq 1 $MAX_RETRIES); do 43 # STATUS=$(curl -s -o /dev/null -w "%{http_code}" "$URL" || echo "000") 44 # if [ "$STATUS" = "200" ]; then 45 # echo "Codex is ready" 46 # exit 0 47 # fi 48 49 # sleep $SLEEP_INTERVAL 50 # done 51 52 # echo "Timed out after ${TIMEOUT_SECONDS}s waiting for $URL" 53 # exit 1 54 55 # - run: npm test