mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
48 lines
1.5 KiB
YAML
48 lines
1.5 KiB
YAML
name: ocelot.social end-to-end test CI
|
|
on: push
|
|
|
|
jobs:
|
|
fullstack_tests:
|
|
name: Fullstack tests
|
|
runs-on: ubuntu-latest
|
|
# env:
|
|
# jobs: 8
|
|
# strategy:
|
|
# matrix:
|
|
# # run copies of the current job in parallel
|
|
# job: [1, 2, 3, 4, 5, 6, 7, 8]
|
|
# env:
|
|
# jobs: 8
|
|
# strategy:
|
|
# matrix:
|
|
# # run copies of the current job in parallel
|
|
# job: [1, 2, 3, 4, 5, 6, 7, 8]
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: webapp | copy env file
|
|
run: cp webapp/.env.template webapp/.env
|
|
|
|
- name: backend | copy env file
|
|
run: cp backend/.env.template backend/.env
|
|
|
|
- name: boot up test system | docker-compose
|
|
run: docker-compose -f docker-compose.yml -f docker-compose.test.yml up --detach --no-deps webapp neo4j backend
|
|
|
|
- name: cypress | Fullstack tests
|
|
id: e2e-tests
|
|
run: |
|
|
yarn install
|
|
yarn run cypress:run --spec cypress/integration/Moderation.ReportContent.feature
|
|
|
|
##########################################################################
|
|
# UPLOAD SCREENSHOTS - IF TESTS FAIL #####################################
|
|
##########################################################################
|
|
- name: Full stack tests | if any test failed, upload screenshots
|
|
if: ${{ failure() && steps.e2e-tests.conclusion == 'failure' }}
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: cypress-screenshots
|
|
path: cypress/screenshots/
|