Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 29 additions & 18 deletions .github/workflows/accessibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@ name: Accessibility
on:
pull_request:
paths:
- '.github/workflows/accessibility.yml'
- 'package.json'
- 'pnpm-lock.yaml'
- 'pnpm-workspace.yaml'
- 'apps/dashboard/**'
- ".github/workflows/accessibility.yml"
- "package.json"
- "pnpm-lock.yaml"
- "pnpm-workspace.yaml"
- "apps/dashboard/**"
push:
branches:
- main
paths:
- '.github/workflows/accessibility.yml'
- 'package.json'
- 'pnpm-lock.yaml'
- 'pnpm-workspace.yaml'
- 'apps/dashboard/**'
- ".github/workflows/accessibility.yml"
- "package.json"
- "pnpm-lock.yaml"
- "pnpm-workspace.yaml"
- "apps/dashboard/**"
workflow_dispatch:

permissions:
Expand All @@ -30,12 +30,23 @@ jobs:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Set up PNPM
uses: pnpm/setup@4700d737c3d7a2e7199f3d42a920f0bf7f34e411 # v2.0.1
with:
node-version: 24
cache: pnpm
- run: pnpm install --frozen-lockfile
- name: Run Accessibility Audit
run: pnpm run test:accessibility:ci
cache: true
runtime: node@lts

- name: Locate Chromium
run: |
chromium_path="$(command -v chromium || command -v chromium-browser || true)"
if [ -z "$chromium_path" ]; then
echo "Chromium is not installed on the runner" >&2
exit 1
fi
echo "PLAYWRIGHT_CHROMIUM_EXECUTABLE=$chromium_path" >> "$GITHUB_ENV"

- name: Run accessibility tests
run: pnpm test:accessibility:ci
14 changes: 8 additions & 6 deletions .github/workflows/check-and-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@ jobs:
matrix:
task: [check, lint]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Set up PNPM
uses: pnpm/setup@4700d737c3d7a2e7199f3d42a920f0bf7f34e411 # v2.0.1
with:
node-version: 24
cache: pnpm
- run: pnpm install --frozen-lockfile
cache: true
runtime: node@lts

- run: pnpm run ${{ matrix.task }}
33 changes: 22 additions & 11 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,30 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Set up PNPM
uses: pnpm/setup@4700d737c3d7a2e7199f3d42a920f0bf7f34e411 # v2.0.1
with:
node-version: 24
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm run check
- run: pnpm run lint
- run: pnpm -r build
- run: pnpm --filter stack-dashboard run cf:deploy
cache: true
runtime: node@lts

- name: Check
run: pnpm run check

- name: Lint
run: pnpm run lint

- name: Build
run: pnpm -r build

- name: Deploy dashboard
run: pnpm --filter stack-dashboard run cf:deploy
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
- run: pnpm --filter stack-dashboard-cron run cf:deploy

- name: Deploy dashboard cron
run: pnpm --filter stack-dashboard-cron run cf:deploy
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
4 changes: 2 additions & 2 deletions apps/dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"dev": "NODE_TLS_REJECT_UNAUTHORIZED=0 vite dev",
"build": "vite build",
"preview": "vite preview",
"test:accessibility": "playwright test",
"test:accessibility:ci": "playwright install --with-deps chrome && playwright test",
"test:accessibility": "svelte-kit sync && playwright test",
"test:accessibility:ci": "svelte-kit sync && playwright test",
"cf:dev": "pnpm run build && wrangler dev -c wrangler.local.jsonc --local-protocol http",
"cf:dev:remote": "pnpm run build && wrangler dev --remote",
"cf:deploy": "wrangler deploy --env=\"\"",
Expand Down
11 changes: 6 additions & 5 deletions apps/dashboard/playwright.config.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
import { defineConfig, devices } from '@playwright/test';

const isCI = !!process.env['CI'];
const isCI = Boolean(process.env.CI);
const chromiumExecutable = process.env.PLAYWRIGHT_CHROMIUM_EXECUTABLE;

export default defineConfig({
forbidOnly: isCI,
fullyParallel: true,
projects: [
{
name: 'Chrome',
name: 'Chromium',
use: {
...devices['Desktop Chrome'],
channel: isCI ? 'chrome' : undefined,
launchOptions: { executablePath: chromiumExecutable },
headless: true
}
},
{
name: 'Mobile Chrome',
name: 'Mobile Chromium',
use: {
...devices['Pixel 5'],
channel: isCI ? 'chrome' : undefined,
launchOptions: { executablePath: chromiumExecutable },
headless: true
}
}
Expand Down