feat: configure Cypress #10
Workflow file for this run
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: 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: install packages (backend) | |
working-directory: ./publish-backend | |
run: npm install | |
- 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: Import strappi config | |
working-directory: ./publish-backend | |
run: | | |
docker compose up -d && wait | |
npm run cs export | |
echo "y" | |
- name: seed data | |
working-directory: ./publish-backend | |
env: | |
SEED_DATA: true | |
run: | | |
npm install | |
docker compose up -d | |
- 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: | |