mirror of
https://github.com/wassname/Open-Assistant.git
synced 2026-06-27 16:10:30 +08:00
Merge pull request #439 from othrayte/ci-e2e-basic
Automate e2e test of the website (basic)
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
name: E2E Tests (Website)
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- oasst-shared/**
|
||||
- backend/**
|
||||
- website/**
|
||||
pull_request:
|
||||
paths:
|
||||
- oasst-shared/**
|
||||
- backend/**
|
||||
- website/**
|
||||
|
||||
jobs:
|
||||
test-e2e:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Start website, backend, etc
|
||||
run: docker compose up ci --build -d
|
||||
- name: Run Cypress tests
|
||||
uses: cypress-io/github-action@v5.0.2
|
||||
with:
|
||||
browser: chrome
|
||||
working-directory: website
|
||||
- uses: actions/upload-artifact@v3
|
||||
if: failure() # NOTE: screenshots will be generated only if E2E test failed
|
||||
with:
|
||||
name: cypress-screenshots
|
||||
path: website/cypress/screenshots
|
||||
- uses: actions/upload-artifact@v3
|
||||
if: always()
|
||||
with:
|
||||
name: cypress-videos
|
||||
path: website/cypress/videos
|
||||
@@ -11,6 +11,11 @@ services:
|
||||
image: sverrirab/sleep
|
||||
depends_on: [db, webdb, adminer, maildev, backend, redis]
|
||||
|
||||
# Used by CI automations.
|
||||
ci:
|
||||
image: sverrirab/sleep
|
||||
depends_on: [db, webdb, maildev, backend, redis, web]
|
||||
|
||||
# This DB is for the FastAPI Backend.
|
||||
db:
|
||||
image: postgres
|
||||
|
||||
Reference in New Issue
Block a user