Spaces:
Running
Running
Download source/teaql-ts/.github/workflows/example-gate.yml from teaql/browser-sqlite-playground: direct link, hf CLI and curl.
- Browser
- Download file 1.67 kB
-
https://huggingface.co/spaces/teaql/browser-sqlite-playground/resolve/main/source/teaql-ts/.github/workflows/example-gate.yml
- Command line
-
hf download hf://spaces/teaql/browser-sqlite-playground/source/teaql-ts/.github/workflows/example-gate.yml
-
curl -L -o example-gate.yml https://huggingface.co/spaces/teaql/browser-sqlite-playground/resolve/main/source/teaql-ts/.github/workflows/example-gate.yml
1.67 kB
| name: Example Gate | |
| on: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| jobs: | |
| examples: | |
| runs-on: ubuntu-latest | |
| env: | |
| TEAQL_S3_ENDPOINT: http://127.0.0.1:19010 | |
| TEAQL_S3_BUCKET: teaql-ts-example-ci | |
| TEAQL_S3_ACCESS_KEY: teaql-ts-example-ci | |
| TEAQL_S3_SECRET_KEY: teaql-ts-example-ci-fixture-only | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install example verification tools | |
| run: sudo apt-get update && sudo apt-get install -y ripgrep | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| cache: npm | |
| - run: npm install | |
| - run: npm run build | |
| - name: Start dedicated S3 example fixture | |
| run: | | |
| docker run -d --name teaql-ts-example-s3 \ | |
| -p 127.0.0.1:19010:9000 \ | |
| -e RUSTFS_ACCESS_KEY="$TEAQL_S3_ACCESS_KEY" \ | |
| -e RUSTFS_SECRET_KEY="$TEAQL_S3_SECRET_KEY" \ | |
| -e RUSTFS_CONSOLE_ENABLE=false \ | |
| rustfs/rustfs@sha256:41fe89380f4120a337790c02af192c3fe7bb55c3edc2e6e9357b487b47c6ab21 /data | |
| for attempt in {1..30}; do | |
| if curl -sS -o /dev/null --max-time 2 "$TEAQL_S3_ENDPOINT/"; then | |
| exit 0 | |
| fi | |
| if [[ "$(docker inspect --format '{{.State.Running}}' teaql-ts-example-s3)" != true ]]; then | |
| docker logs teaql-ts-example-s3 | |
| exit 1 | |
| fi | |
| sleep 1 | |
| done | |
| docker logs teaql-ts-example-s3 | |
| exit 1 | |
| - run: ./scripts/verify-examples.sh | |
| - name: Stop dedicated S3 example fixture | |
| if: always() | |
| run: docker rm -f teaql-ts-example-s3 || true | |