Handle Ollama offline gracefully with retry and 503 response #131
Workflow file for this run
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 Tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - develop | |
| pull_request: | |
| branches: | |
| - main | |
| - develop | |
| jobs: | |
| test: | |
| name: Run Tests | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [20.x, 22.x, 23.x, 24.x] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: 'npm' | |
| - name: Install dependencies (C++20 for native addons) | |
| env: | |
| CXXFLAGS: "-std=gnu++20" | |
| npm_config_build_from_source: true | |
| run: npm ci | |
| - name: Run linter | |
| run: npm run lint | |
| continue-on-error: true | |
| - name: Run unit tests | |
| run: npm run test:unit | |
| env: | |
| DATABRICKS_API_KEY: test-key | |
| DATABRICKS_API_BASE: http://test.com | |
| - name: Run performance tests | |
| run: npm run test:performance | |
| env: | |
| DATABRICKS_API_KEY: test-key | |
| DATABRICKS_API_BASE: http://test.com | |
| continue-on-error: true | |
| test-summary: | |
| name: Test Summary | |
| runs-on: ubuntu-latest | |
| needs: test | |
| if: always() | |
| steps: | |
| - name: Check test results | |
| run: | | |
| echo "Tests completed" | |
| if [ "${{ needs.test.result }}" == "failure" ]; then | |
| echo "Tests failed!" | |
| exit 1 | |
| fi | |
| echo "All tests passed!" |