1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-07-28 20:44:38 +02:00
This commit is contained in:
kakkokari-gtyih
2026-07-08 16:36:58 +09:00
parent b02c1baf8f
commit e60e965c3c
2 changed files with 110 additions and 47 deletions

View File

@@ -23,8 +23,8 @@ on:
- .github/workflows/test-frontend.yml
- .github/misskey/test.yml
jobs:
vitest:
name: Unit tests (frontend)
build:
name: Build
runs-on: ubuntu-latest
steps:
@@ -45,6 +45,34 @@ jobs:
run: cp .github/misskey/test.yml .config
- name: Build
run: pnpm build
- name: Archive built repository
run: tar -C "$GITHUB_WORKSPACE" -czf "$RUNNER_TEMP/frontend-test-repo.tar.gz" .
- name: Upload built repository
uses: actions/upload-artifact@v7
with:
name: frontend-test-repo
path: ${{ runner.temp }}/frontend-test-repo.tar.gz
vitest:
name: Unit tests (frontend)
runs-on: ubuntu-latest
needs: build
steps:
- name: Download built repository
uses: actions/download-artifact@v8
with:
name: frontend-test-repo
path: ${{ runner.temp }}
- name: Extract built repository
run: tar -C "$GITHUB_WORKSPACE" -xzf "$RUNNER_TEMP/frontend-test-repo.tar.gz"
- name: Setup pnpm
uses: pnpm/action-setup@v6.0.9
- name: Use Node.js
uses: actions/setup-node@v6.4.0
with:
node-version-file: '.node-version'
cache: 'pnpm'
- name: Test
run: pnpm --filter frontend test-and-coverage
- name: Upload Coverage
@@ -56,6 +84,7 @@ jobs:
e2e:
name: E2E tests (frontend)
runs-on: ubuntu-latest
needs: build
services:
postgres:
@@ -71,9 +100,13 @@ jobs:
- 56312:6379
steps:
- uses: actions/checkout@v6.0.3
- name: Download built repository
uses: actions/download-artifact@v8
with:
submodules: true
name: frontend-test-repo
path: ${{ runner.temp }}
- name: Extract built repository
run: tar -C "$GITHUB_WORKSPACE" -xzf "$RUNNER_TEMP/frontend-test-repo.tar.gz"
- name: Setup pnpm
uses: pnpm/action-setup@v6.0.9
- name: Use Node.js
@@ -81,11 +114,6 @@ jobs:
with:
node-version-file: '.node-version'
cache: 'pnpm'
- run: pnpm i --frozen-lockfile
- name: Copy Configure
run: cp .github/misskey/test.yml .config
- name: Build
run: pnpm build
- name: Playwright install
working-directory: packages/frontend
run: pnpm exec playwright install --with-deps chromium