Skip to content

ajuste length esperado #55

ajuste length esperado

ajuste length esperado #55

Workflow file for this run

name: Test Pipeline with Docker Compose and Cypress
on:
workflow_dispatch:
push:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install Dependencies
run: npm install
- name: Set up Docker
uses: docker/setup-qemu-action@v2
- name: Start MongoDB Database using Docker Compose
run: docker-compose up -d
- name: Wait for MongoDB to Initialize
run: |
sleep 10
docker ps
- name: Import Data into MongoDB
run: node cypress/mongodb/import.js
- name: Run Cypress Tests
uses: cypress-io/github-action@v5
with:
record: true
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
MONGO_URI: ${{secrets.MONGO_URI}}
MONGO_COLLECTION: ${{secrets.MONGO_COLLECTION}}
MONGO_DB: ${{secrets.MONGO_DB}}
- name: Stop Docker Compose
run: docker-compose down