Skip to content

Commit

Permalink
Test core volto slate with prefixed site
Browse files Browse the repository at this point in the history
  • Loading branch information
wesleybl committed Mar 18, 2024
1 parent 235e4c5 commit 38e428c
Showing 1 changed file with 85 additions and 0 deletions.
85 changes: 85 additions & 0 deletions .github/workflows/acceptance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1652,6 +1652,91 @@ jobs:
name: cypress-videos
path: packages/volto/cypress/videos

prefix-corevoltoslate:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
name: Core Volto Slate Prefixed Site
runs-on: ubuntu-latest
timeout-minutes: 35
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v4

# node setup
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

# pnpm install
- uses: pnpm/action-setup@v3
name: Install pnpm
with:
version: 8
run_install: false

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Cache Cypress Binary
id: cache-cypress-binary
uses: actions/cache@v4
with:
path: ~/.cache/Cypress
key: binary-${{ matrix.node-version }}-${{ hashFiles('pnpm-lock.yaml') }}

- run: pnpm i

- name: Install Cypress if not in cache
if: steps.cache-cypress-binary.outputs.cache-hit != 'true'
working-directory: packages/volto
run: make cypress-install

- name: Cypress acceptance tests
uses: cypress-io/github-action@v6
env:
BABEL_ENV: production
CYPRESS_RETRIES: 2
# Recommended: pass the GitHub token lets this action correctly
# determine the unique run id necessary to re-run the checks
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
install: false
working-directory: packages/volto
browser: chrome
spec: cypress/tests/core/volto-slate/**/*.js
config: baseUrl=http://localhost/foo
env: prefixPath=/foo
start: |
make start-test-acceptance-server
make start-test-acceptance-frontend-prefixed
make start-test-acceptance-webserver-prefixed
wait-on: 'npx wait-on --httpTimeout 20000 http-get://127.0.0.1:55001/plone http://127.0.0.1:3000/foo http://localhost/foo'

# Upload Cypress screenshots
- uses: actions/upload-artifact@v1
if: failure()
with:
name: cypress-screenshots
path: packages/volto/cypress/screenshots
# Upload Cypress videos
- uses: actions/upload-artifact@v1
if: failure()
with:
name: cypress-videos
path: packages/volto/cypress/videos

multilingualprefix:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
name: Multilingual in Prefixed site
Expand Down

0 comments on commit 38e428c

Please sign in to comment.