Skip to content

feat: run frontend cypress tests as github action #22

feat: run frontend cypress tests as github action

feat: run frontend cypress tests as github action #22

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 "openapi.json" "{\"openapi\"" 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: chrome
wait-on: "http://localhost/apps"
config-file: ${{ github.workspace }}/agenta-web/cypress.config.ts
working-directory: agenta-web
env:
ELECTRON_EXTRA_LAUNCH_ARGS: "--disable-gpu"
NEXT_PUBLIC_OPENAI_API_KEY: ${{ secrets.NEXT_PUBLIC_OPENAI_API_KEY }}
# DEBUG: cypress:*
- name: Stop Docker Compose
run: docker-compose down