Fix vertical height #1182
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: Run Tests | |
| on: | |
| push: | |
| branches: | |
| - '**' | |
| pull_request: | |
| branches: | |
| - '**' | |
| permissions: | |
| contents: read | |
| jobs: | |
| test-go: | |
| name: Test Go Backend | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.26.1' | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: 1.3.10 | |
| - name: Download dependencies | |
| run: go mod download | |
| - name: Build frontend (required for Go embed) | |
| working-directory: ./web | |
| run: | | |
| bun install | |
| bun run build | |
| - name: Run Go tests | |
| run: go test -v -race -coverprofile=coverage.out -covermode=atomic ./... | |
| - name: Verify binary builds | |
| run: go build -o /dev/null . | |
| - name: Display test coverage | |
| run: go tool cover -func=coverage.out | |
| test-web: | |
| name: Test Web Frontend | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: 1.3.10 | |
| - name: Cache Bun dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.bun/install/cache | |
| web/node_modules | |
| key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-bun- | |
| - name: Install web dependencies | |
| working-directory: ./web | |
| run: bun install | |
| - name: Run type checking | |
| working-directory: ./web | |
| run: bun run type-check | |
| - name: Run linter | |
| working-directory: ./web | |
| run: bun run lint | |
| - name: Run JavaScript tests | |
| working-directory: ./web | |
| run: bun run test | |
| - name: Build web frontend | |
| working-directory: ./web | |
| run: bun run build | |
| test-docs: | |
| name: Test Documentation | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: 1.3.10 | |
| - name: Install Task | |
| uses: arduino/setup-task@v2 | |
| with: | |
| version: 3.x | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Run docs tests | |
| run: task test:docs | |
| test-runbooks: | |
| name: Test Demo Runbooks | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write # Required for OIDC | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.26.1' | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: 1.3.10 | |
| - name: Install Task | |
| uses: arduino/setup-task@v2 | |
| with: | |
| version: 3.x | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Configure AWS credentials via OIDC | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| role-to-assume: ${{ secrets.RUNBOOKS_TEST_AWS_ROLE_ARN }} | |
| aws-region: us-west-2 | |
| - name: Export AWS credentials with test prefix | |
| run: | | |
| # Export credentials with RUNBOOKS_TEST_ prefix for aws-auth tests | |
| echo "RUNBOOKS_TEST_AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID" >> $GITHUB_ENV | |
| echo "RUNBOOKS_TEST_AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY" >> $GITHUB_ENV | |
| echo "RUNBOOKS_TEST_AWS_SESSION_TOKEN=$AWS_SESSION_TOKEN" >> $GITHUB_ENV | |
| echo "RUNBOOKS_TEST_AWS_REGION=$AWS_REGION" >> $GITHUB_ENV | |
| - name: Run runbook tests | |
| env: | |
| RUNBOOKS_GITHUB_TOKEN: ${{ secrets.RUNBOOKS_GITHUB_TOKEN }} | |
| run: task test:runbooks | |
| test-e2e: | |
| name: Playwright E2E Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.26.1' | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: 1.3.10 | |
| - name: Install web dependencies | |
| working-directory: ./web | |
| run: bun install | |
| - name: Get Playwright version | |
| id: pw-version | |
| working-directory: ./web | |
| run: echo "version=$(bunx playwright --version | awk '{print $2}')" >> $GITHUB_OUTPUT | |
| - name: Cache Playwright browsers | |
| id: pw-cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/ms-playwright | |
| key: ${{ runner.os }}-playwright-${{ steps.pw-version.outputs.version }} | |
| - name: Install Playwright browsers | |
| if: steps.pw-cache.outputs.cache-hit != 'true' | |
| working-directory: ./web | |
| run: bunx playwright install --with-deps chromium | |
| - name: Install Playwright system deps only | |
| if: steps.pw-cache.outputs.cache-hit == 'true' | |
| working-directory: ./web | |
| run: bunx playwright install-deps chromium | |
| - name: Run Playwright tests | |
| working-directory: ./web | |
| run: bunx playwright test | |
| - name: Upload Playwright report | |
| uses: actions/upload-artifact@v4 | |
| if: ${{ !cancelled() }} | |
| with: | |
| name: playwright-report | |
| path: web/playwright-report/ | |
| retention-days: 30 | |
| - name: Upload test results | |
| uses: actions/upload-artifact@v4 | |
| if: ${{ !cancelled() }} | |
| with: | |
| name: playwright-results | |
| path: web/test-results/ | |
| retention-days: 30 | |
| test-summary: | |
| name: Test Summary | |
| needs: [test-go, test-web, test-docs, test-runbooks, test-e2e] | |
| runs-on: ubuntu-latest | |
| if: always() | |
| steps: | |
| - name: Check test results | |
| run: | | |
| if [ "${{ needs.test-go.result }}" != "success" ] || [ "${{ needs.test-web.result }}" != "success" ] || [ "${{ needs.test-docs.result }}" != "success" ] || [ "${{ needs.test-runbooks.result }}" != "success" ] || [ "${{ needs.test-e2e.result }}" != "success" ]; then | |
| echo "Tests failed!" | |
| exit 1 | |
| fi | |
| echo "All tests passed!" |