feat(ci): build frontend before test

This commit is contained in:
kolaente
2025-05-15 11:34:50 +02:00
parent d472e043c5
commit 2bdb5c9b67

View File

@@ -262,11 +262,26 @@ jobs:
- name: Run unit tests
working-directory: frontend
run: pnpm test:unit
build-frontend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: ./.github/actions/setup-frontend
- name: Build frontend
working-directory: frontend
run: pnpm build
- name: Store Frontend
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: frontend_dist
path: ./frontend/dist
test-frontend-e2e:
runs-on: ubuntu-latest
needs:
- api-build
- build-frontend
strategy:
# when one test fails, DO NOT cancel the other
# containers, because this will kill Cypress processes
@@ -277,15 +292,16 @@ jobs:
containers: [1, 2, 3, 4, 5]
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: ./.github/actions/setup-frontend
- name: Download Vikunja Binary
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
with:
name: vikunja_bin
- name: Build frontend for test
run: |
cd frontend
pnpm build
- uses: ./.github/actions/setup-frontend
- name: Download Frontend
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
with:
name: frontend_dist
path: ./frontend/dist
- name: Run api
env:
VIKUNJA_SERVICE_TESTINGTOKEN: averyLongSecretToSe33dtheDB