Merge pull request #1096 from Codeinwp/fix/store-preview #494
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test e2e | |
on: | |
push: | |
branches-ignore: master | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
e2e: | |
name: E2E for ${{ matrix.env }} | |
env: | |
DOCKER_FILE: docker-compose.ci.yml | |
strategy: | |
fail-fast: false | |
matrix: | |
env: ["default","gutenberg", "gutenberg-datatable"] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: '14' | |
- uses: actions/cache@v2 | |
id: npm-and-build-cache | |
with: | |
path: | | |
~/.cache/Cypress | |
node_modules | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Install npm deps | |
run: npm ci | |
- name: Install composer deps | |
run: composer install --no-dev | |
- name: Install environment | |
run: | | |
npm run up:ci | |
bash ./bin/run-e2e-tests-${{matrix.env}}.sh | |
- name: Run ${{ matrix.env }} Cypress tests | |
env: | |
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} | |
uses: cypress-io/github-action@v2 | |
with: | |
env: host=localhost,port=8080 | |
browser: chrome | |
install: ${{ ! steps.npm-and-build-cache.outputs.cache-hit }} | |
headless: true | |
spec: cypress/integration/${{ matrix.env }}/**/* |