mirror of
https://github.com/logos-storage/logos-storage-js.git
synced 2026-01-02 13:33:07 +00:00
56 lines
1.2 KiB
YAML
56 lines
1.2 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
node_version: 22.12.0
|
|
|
|
permissions:
|
|
id-token: write
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
URL: "http://localhost:8081/api/codex/v1/debug/info"
|
|
TIMEOUT_SECONDS: 300
|
|
SLEEP_INTERVAL: 2
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: ${{ env.node_version }}
|
|
registry-url: "https://registry.npmjs.org"
|
|
|
|
- run: npm ci
|
|
|
|
# - name: Start codex-factory
|
|
# run: npx codex-factory start latest &
|
|
|
|
# - name: Wait for first SP to be started
|
|
# run: |
|
|
# MAX_RETRIES=$((TIMEOUT_SECONDS / SLEEP_INTERVAL))
|
|
# echo "Waiting for $URL (timeout: ${TIMEOUT_SECONDS}s)..."
|
|
|
|
# for i in $(seq 1 $MAX_RETRIES); do
|
|
# STATUS=$(curl -s -o /dev/null -w "%{http_code}" "$URL" || echo "000")
|
|
# if [ "$STATUS" = "200" ]; then
|
|
# echo "Codex is ready"
|
|
# exit 0
|
|
# fi
|
|
|
|
# sleep $SLEEP_INTERVAL
|
|
# done
|
|
|
|
# echo "Timed out after ${TIMEOUT_SECONDS}s waiting for $URL"
|
|
# exit 1
|
|
|
|
# - run: npm test
|