Skip to content

Staging release v20230514.1 #2499

Staging release v20230514.1

Staging release v20230514.1 #2499

Workflow file for this run

name: Enterprise Search e2e tests
env:
NODE_VERSION: "16"
on:
pull_request:
branches:
- develop
- production
- staging
paths:
- 'bin/search/**'
- 'search/**'
- 'tests/search/e2e/**'
- 'package-lock.json'
- '.github/workflows/search-e2e.yml'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
cypress_local:
name: Cypress - Local
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.5
with:
submodules: recursive
- name: Prepare source code
uses: ./.github/actions/prepare-source
- name: "Install node v${{ env.NODE_VERSION }}"
uses: actions/setup-node@v4.0.2
with:
node-version: ${{ env.NODE_VERSION }}
cache: npm
- name: Install dependencies
run: npm ci
- name: Set up WP environment with Elasticsearch
run: npm run search-env:start
- name: Build asset
run: npm run search-build
- name: Set up database
run: npm run cypress:setup
- name: Test
run: npm run cypress:run
- name: Make artifacts available
uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-artifact
retention-days: 2
path: |
${{ github.workspace }}/tests/cypress/screenshots/
${{ github.workspace }}/tests/cypress/videos/
${{ github.workspace }}/tests/cypress/logs/
${{ github.workspace }}/cypress/results/
- name: Stop Elasticsearch
if: always()
run: cd bin/search/es-docker/ && docker-compose down