Add Noto Mono to browser images #1415
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: Test for the server/ directory | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["main"] | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build-headful: | |
| uses: ./.github/workflows/chromium-headful-image.yaml | |
| secrets: inherit | |
| build-headless: | |
| uses: ./.github/workflows/chromium-headless-image.yaml | |
| secrets: inherit | |
| test-server-unit: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: "server/go.mod" | |
| cache: true | |
| cache-dependency-path: server/go.sum | |
| # categorygen's checks (unclassified route, category that isn't control or | |
| # platform, classified route with no handler) only run when the generator | |
| # does, and its only other caller is `make oapi-generate`, which needs the | |
| # npm down-converter. Running it here enforces them on every change. | |
| - name: Check generated event categories are current | |
| run: | | |
| go generate ./lib/events/... | |
| git diff --exit-code -- lib/events/category_gen.go | |
| working-directory: server | |
| - name: Run server unit tests | |
| run: make test-unit | |
| working-directory: server | |
| test-server-e2e: | |
| runs-on: ubuntu-latest | |
| needs: [build-headful, build-headless] | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Chrome | |
| uses: browser-actions/setup-chrome@v2 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - name: Set up pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 | |
| - name: Add pnpm to PATH | |
| run: | | |
| echo "$PNPM_HOME" >> "$GITHUB_PATH" | |
| export PATH="$PNPM_HOME:$PATH" | |
| pnpm --version | |
| - name: Install Playwright e2e dependencies | |
| run: pnpm install --frozen-lockfile | |
| working-directory: server/e2e/playwright | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: "server/go.mod" | |
| cache: true | |
| cache-dependency-path: server/go.sum | |
| - name: Compute short SHA for images | |
| id: vars | |
| shell: bash | |
| run: echo "short_sha=${GITHUB_SHA::7}" >> "$GITHUB_OUTPUT" | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ vars.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Pull e2e images | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| docker pull "$E2E_CHROMIUM_HEADFUL_IMAGE" & | |
| headful_pid=$! | |
| docker pull "$E2E_CHROMIUM_HEADLESS_IMAGE" & | |
| headless_pid=$! | |
| wait "$headful_pid" | |
| wait "$headless_pid" | |
| env: | |
| E2E_CHROMIUM_HEADFUL_IMAGE: onkernel/chromium-headful:${{ steps.vars.outputs.short_sha }} | |
| E2E_CHROMIUM_HEADLESS_IMAGE: onkernel/chromium-headless:${{ steps.vars.outputs.short_sha }} | |
| - name: Run server e2e tests | |
| run: make test-e2e | |
| working-directory: server | |
| env: | |
| E2E_CHROMIUM_HEADFUL_IMAGE: onkernel/chromium-headful:${{ steps.vars.outputs.short_sha }} | |
| E2E_CHROMIUM_HEADLESS_IMAGE: onkernel/chromium-headless:${{ steps.vars.outputs.short_sha }} |