WIP: Tailwind CSS v4 migration (incomplete) #13844
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: End-to-end tests of web+runtime | |
| on: | |
| pull_request: | |
| paths: | |
| - ".github/workflows/web-test-e2e.yml" | |
| - "admin/**" | |
| - "cli/**" | |
| - "runtime/**" | |
| - "web-admin/**" | |
| - "web-common/**" | |
| - "web-local/**" | |
| workflow_dispatch: | |
| inputs: | |
| browser: | |
| type: choice | |
| options: | |
| - "chrome" | |
| - "safari" | |
| - "firefox" | |
| - "all" | |
| default: "chrome" | |
| description: "Choose which browser to test" | |
| jobs: | |
| setup: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| matrix: ${{ steps.matrix.outputs.matrix }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Filter modified codepaths | |
| uses: dorny/paths-filter@v3 | |
| id: filter | |
| with: | |
| filters: | | |
| admin: | |
| - ".github/workflows/web-test-e2e.yml" | |
| - "admin/**" | |
| - "cli/**" | |
| - "runtime/**" | |
| - "web-admin/**" | |
| local: | |
| - ".github/workflows/web-test-e2e.yml" | |
| - "cli/**" | |
| - "runtime/**" | |
| - "web-local/**" | |
| common: | |
| - ".github/workflows/web-test-e2e.yml" | |
| - "cli/**" | |
| - "runtime/**" | |
| - "web-common/**" | |
| - name: Evaluate e2e tests matrix | |
| id: matrix | |
| run: | | |
| echo "matrix=$(jq -n '[ | |
| ("web-admin" | select(env.FILTER_ADMIN == "true" or env.FILTER_COMMON == "true")), | |
| ("web-local" | select(env.FILTER_LOCAL == "true" or env.FILTER_COMMON == "true")), | |
| ("web-integration" | select(env.FILTER_LOCAL == "true" or env.FILTER_ADMIN == "true" or env.FILTER_COMMON == "true")) | |
| ]' | jq -c)" >> "$GITHUB_OUTPUT" | |
| env: | |
| FILTER_ADMIN: ${{ steps.filter.outputs.admin }} | |
| FILTER_COMMON: ${{ steps.filter.outputs.common }} | |
| FILTER_LOCAL: ${{ steps.filter.outputs.local }} | |
| e2e: | |
| runs-on: ubuntu-latest | |
| needs: setup | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| name: ${{ fromJson(needs.setup.outputs.matrix) }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up NodeJS | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: '.nvmrc' | |
| - name: NPM Install | |
| run: npm install | |
| # https://typicode.github.io/husky/how-to.html#ci-server-and-docker | |
| env: | |
| HUSKY: 0 | |
| - name: Set up go for E2E | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: 1.24 | |
| - name: Build and embed static UI | |
| if: matrix.name != 'web-admin' | |
| run: PLAYWRIGHT_TEST=true make cli | |
| - name: Build rill cli only | |
| if: matrix.name == 'web-admin' | |
| run: PLAYWRIGHT_TEST=true make cli-only | |
| - name: Install duckdb extensions | |
| run: ./rill runtime install-duckdb-extensions | |
| - name: Add CLI binary to PATH | |
| run: echo "$GITHUB_WORKSPACE" >> $GITHUB_PATH | |
| - name: Install browser for UI tests | |
| run: | | |
| npx playwright@^1.50.1 install | |
| npx playwright install-deps | |
| - name: Authenticate GCloud | |
| uses: google-github-actions/auth@v2 | |
| if: (matrix.name == 'web-admin' || matrix.name == 'web-integration') | |
| with: | |
| credentials_json: "${{ secrets.RILL_BINARY_SA }}" | |
| - name: Set up GCloud SDK | |
| if: (matrix.name == 'web-admin' || matrix.name == 'web-integration') | |
| uses: google-github-actions/setup-gcloud@v2 | |
| - name: Test web-local | |
| if: matrix.name == 'web-local' | |
| run: |- | |
| # For pull requests, always use chrome | |
| if [ "${{ github.event_name }}" == "pull_request" ]; then | |
| npm run test:chrome -w web-local | |
| # For manual workflow runs, use the selected browser | |
| elif [ "${{ github.event.inputs.browser }}" == "all" ]; then | |
| npm run test:all -w web-local | |
| elif [ "${{ github.event.inputs.browser }}" == "chrome" ]; then | |
| npm run test:chrome -w web-local | |
| elif [ "${{ github.event.inputs.browser }}" == "safari" ]; then | |
| npm run test:safari -w web-local | |
| elif [ "${{ github.event.inputs.browser }}" == "firefox" ]; then | |
| npm run test:firefox -w web-local | |
| else | |
| echo "Invalid browser choice: ${{ github.event.inputs.browser }}" | |
| exit 1 | |
| fi | |
| - name: Test web-admin | |
| if: matrix.name == 'web-admin' | |
| run: |- | |
| npm run build -w web-admin | |
| npm run test -w web-admin | |
| - name: Test web-integration | |
| if: matrix.name == 'web-integration' | |
| run: |- | |
| npm run test -w web-integration | |
| - uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: ${{ matrix.name }}-playwright-report | |
| path: ${{ matrix.name }}/playwright-report/ | |
| retention-days: 30 | |
| - uses: actions/upload-artifact@v4 | |
| if: always() && matrix.name == 'web-admin' | |
| with: | |
| name: web-admin-services-log | |
| path: web-admin/playwright/logs/admin-runtime.log | |
| retention-days: 30 | |
| - uses: actions/upload-artifact@v4 | |
| if: always() && matrix.name == 'web-integration' | |
| with: | |
| name: web-integration-services-log | |
| path: web-integration/playwright/logs/admin-runtime.log | |
| retention-days: 30 |