Skip to content

feat: configure Cypress #14

feat: configure Cypress

feat: configure Cypress #14

Workflow file for this run

name: Cypress
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: create .env file (backend)
working-directory: ./publish-backend
run: cp .env.example .env
- name: create .env file (frontend)
working-directory: ./publish-frontend
run: cp sample.env.local .env.local
- name: install packages (frontend)
working-directory: ./publish-frontend
run: npm install
- name: install packages (backend)
working-directory: ./publish-backend
run: npm install
- name: Import strappi config
working-directory: ./publish-backend
run: |
docker compose up -d && wait
npm run cs export
echo "y"
docker compose down
- name: seed data
working-directory: ./publish-backend
env:
SEED_DATA: true
run: |
docker compose up -d && wait
- name: Cypress run
uses: cypress-io/github-action@v6
with:
working-directory: ./publish-frontend
start: npm run develop
wait-on: 'http://localhost:3000, http://localhost:1337'
wait-on-timeout: 120
env: