test(ci): separate mobile menu checks from a11y suite

This commit is contained in:
Xin
2026-03-06 23:51:37 +00:00
committed by GitHub
parent c2417dc24f
commit cd5f0055e1
12 changed files with 85 additions and 16 deletions

61
.github/workflows/test-mobile-menu.yml vendored Normal file
View File

@@ -0,0 +1,61 @@
name: Mobile Menu Tests
on:
pull_request:
branches: [main]
concurrency:
group: mobile-menu-${{ github.head_ref || github.ref_name }}
cancel-in-progress: true
defaults:
run:
shell: bash
jobs:
mobile-menu:
runs-on: ubuntu-latest
env:
HUGO_VERSION: 0.156.0
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.26"
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "24"
cache: npm
- name: Setup Hugo
run: |
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
- name: Install dependencies
run: npm ci
- name: Install Playwright Chromium
run: npx playwright install chromium
- name: Build site
run: npm run build
- name: Run mobile menu tests
run: npm run test:mobile-menu
- name: Upload report
if: always()
uses: actions/upload-artifact@v4
with:
name: mobile-menu-report
path: playwright-report/
retention-days: 14