Skip to content

Commit

Permalink
CI: Fixed e2e container names and Cypress videos (#777)
Browse files Browse the repository at this point in the history
  • Loading branch information
psrok1 committed Mar 31, 2023
1 parent 81d0d0a commit c138c01
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ jobs:
run: |
docker-compose -f docker-compose-e2e.yml up -d mwdb-tests
docker-compose -f docker-compose-e2e.yml logs -f -t mwdb-tests
([ $(docker wait mwdb-core_mwdb-tests_1) == 0 ])
([ $(docker wait mwdb_core_e2e_tests) == 0 ])
- name: Job failed - storing application logs
if: ${{ failure() }}
run: |
Expand Down Expand Up @@ -200,7 +200,17 @@ jobs:
run: |
docker-compose -f docker-compose-e2e.yml up -d web-tests
docker-compose -f docker-compose-e2e.yml logs -f -t web-tests
([ $(docker wait mwdb-core_web-tests_1) == 0 ])
([ $(docker wait mwdb_core_e2e_web_tests) == 0 ])
- name: Job failed - storing videos from e2e tests
if: ${{ failure() }}
run: |
docker cp mwdb_core_e2e_web_tests:/app/cypress/videos ./artifacts
- name: Job failed - upload application logs
if: ${{ failure() }}
uses: actions/upload-artifact@v2
with:
name: mwdb-e2e-web-videos
path: artifacts
push_images:
needs: [test_backend_e2e, test_frontend_e2e]
name: Push images on Docker Hub
Expand Down
3 changes: 3 additions & 0 deletions docker-compose-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,14 @@ services:
postgres:
image: postgres
restart: always
container_name: mwdb_core_e2e_postgres
environment:
POSTGRES_USER: mwdb
POSTGRES_DB: mwdb
POSTGRES_PASSWORD: e2e-postgres-password
mwdb-tests:
build: tests/backend
container_name: mwdb_core_e2e_tests
depends_on:
- mwdb
- mwdb-web
Expand All @@ -61,6 +63,7 @@ services:
MWDB_URL: http://mwdb-web./api
web-tests:
build: tests/frontend
container_name: mwdb_core_e2e_web_tests
depends_on:
- mwdb
- mwdb-web
Expand Down
2 changes: 1 addition & 1 deletion tests/frontend/cypress/integration/blob.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe("Blob view test - mwdb-core", function () {

browserLogin(Cypress.env("user"), Cypress.env("password"));

cy.contains("Blobs").click({ force: true });
cy.contains("Blobs").click({ timeout: 10000 });

cy.get("@blobId").then((blobId) => {
cy.get('.d-none a[href*="' + blobId + '"] > div').click();
Expand Down

0 comments on commit c138c01

Please sign in to comment.