Skip to content

Commit

Permalink
chore: enable back cypress workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
keellyp committed Sep 6, 2024
1 parent bb2d630 commit 3d05c86
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 89 deletions.
57 changes: 0 additions & 57 deletions .github/workflows/cypress.old

This file was deleted.

60 changes: 60 additions & 0 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: TestE2E

on:
pull_request:
types: [opened, reopened, review_requested, ready_for_review, synchronize]

jobs:
cypress-run:
if: github.event.pull_request.draft == false
name: Run Test E2E
runs-on: ubuntu-latest
env:
ACTIONS_STEP_DEBUG: true
steps:
- name: Check out Git repository
uses: actions/checkout@v4

- name: Checkout API Git repository
uses: actions/checkout@v4
with:
repository: getlago/lago-api
ref: ${{ github.event.inputs.api_branch }}
path: api
token: ${{ secrets.GH_TOKEN }}

- name: Build Front local image
run: |
docker build -t getlago/front:ci ./
- name: Build API local image
run: |
docker build -t getlago/api:ci ./api
- name: Launch APP + API
env:
LAGO_RSA_PRIVATE_KEY: ${{ secrets.LAGO_RSA_PRIVATE_KEY }}
LAGO_LICENSE: ${{ secrets.LAGO_LICENSE }}
run: |
docker compose -f ./ci/docker-compose.ci.yml up -d db redis api front
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20

- name: Cypress run
uses: cypress-io/github-action@v6
env:
CYPRESS_GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
with:
browser: chrome
record: false
config-file: ./cypress/cypress.config.js
config: baseUrl=http://localhost,viewportHeight=99999,viewportWidth=1280
spec: |
cypress/e2e/00-auth/*
cypress/e2e/10-resources/*
cypress/e2e/t10-*
cypress/e2e/t20-*
cypress/e2e/t30-*
11 changes: 0 additions & 11 deletions cypress.config.ts

This file was deleted.

21 changes: 0 additions & 21 deletions docker-compose.ci.yml

This file was deleted.

0 comments on commit 3d05c86

Please sign in to comment.