Skip to content

feat: run frontend cypress tests as github action #26

feat: run frontend cypress tests as github action

feat: run frontend cypress tests as github action #26

Workflow file for this run

name: Execute Frontend tests
on: [pull_request]
jobs:
cypress:
runs-on: ubuntu-latest
environment: oss
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Start Docker Compose
run: docker-compose -f "docker-compose.yml" up -d --build
- name: Install Curl
run: sudo apt install curl -y
- name: Wait for Backend Service
run: sudo bash ./wait_on_api.sh "organizations/" "[{\"id\":\"" 3
- name: Set Node.js 18
uses: actions/setup-node@v3
with:
node-version: 18
- name: Cypress run
uses: cypress-io/github-action@v6
with:
browser: firefox
headed: false
wait-on: "http://localhost/apps"
config-file: ${{ github.workspace }}/agenta-web/cypress.config.ts
# working-directory: agenta-web
env:
NEXT_PUBLIC_OPENAI_API_KEY: ${{ secrets.NEXT_PUBLIC_OPENAI_API_KEY }}
# DEBUG: cypress:*
- name: Stop Docker Compose
run: docker-compose down