Skip to content

Merge commit 'refs/pull/1635/head' of github.com:vikejs/vike #11078

Merge commit 'refs/pull/1635/head' of github.com:vikejs/vike

Merge commit 'refs/pull/1635/head' of github.com:vikejs/vike #11078

Workflow file for this run

name: CI
on: [ push, pull_request ]
jobs:
prepare:
# Prevent workflow being run twice, https://github.com/orgs/community/discussions/57827#discussioncomment-6579237
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- id: getMatrix
run: |
matrix=`node ./.github/workflows/ci/getTestJobs.mjs --ci`
echo "matrix=$matrix" >> $GITHUB_OUTPUT
- run: echo ${{ steps.getMatrix.outputs.matrix }}
outputs:
matrix: ${{ steps.getMatrix.outputs.matrix }}
test:
needs: prepare
strategy:
matrix: ${{fromJson(needs.prepare.outputs.matrix)}}
fail-fast: false
env:
TEST_FILES: ${{ matrix.TEST_FILES }}
TEST_INSPECT: ${{ matrix.TEST_INSPECT }}
runs-on: ${{ matrix.os }}
name: '${{ matrix.jobName }}'
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
- name: Set node version to ${{ matrix.node_version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node_version }}
cache: "pnpm"
- run: pnpm install
- run: pnpm exec playwright install chromium
- run: pnpm run build
- name: Run tests
run: ${{ matrix.jobCmd }}
env:
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
- name: Upload screenshots
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: 'screenshots'
path: |
**/test-screenshot-expect.png
**/test-screenshot-actual.png
**/test-screenshot-differ.png