Skip to content

Commit

Permalink
ci(e2e): add timeout for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sirchnik-xitaso committed Feb 4, 2025
1 parent d932465 commit 5db6ebd
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,11 @@ jobs:
uses: docker/setup-buildx-action@v3

- name: Build image
id: build
uses: docker/build-push-action@v6
with:
platforms: linux/amd64
context: "."
cache-to: type=gha,scope=amd64,mode=max
cache-from: type=gha,scope=amd64
target: production
push: false
tags: mnestix/mnestix-browser:latest
Expand Down Expand Up @@ -83,11 +81,12 @@ jobs:
- name: Pull images
run: docker compose -f compose.yml -f docker-compose/compose.test.yml --profile tests pull

# overwrite the pulled image with the new image
- name: Load mnestix-browser image
run: docker load -i mnestix-browser.tar

- name: Run e2e tests
id: test
timeout-minutes: 18
run: |
docker compose -f compose.yml -f docker-compose/compose.test.yml --profile tests up -d &&
docker compose -f compose.yml -f docker-compose/compose.test.yml attach cypress-test
Expand All @@ -98,16 +97,12 @@ jobs:
TEST_USER_PASSWORD: ${{ secrets.TEST_USER_PASSWORD }}

- name: E2E test collect artifact
id: test_artifact
if: always()
uses: actions/upload-artifact@v4
with:
name: cypress-artifacts-${{ matrix.containers }}
path: cypress-artifacts/

- name: Fail if e2e tests failed
if: ${{ failure() }}
run: exit 1

unit-tests:
name: Unit Tests
runs-on: ubuntu-latest
Expand All @@ -120,7 +115,6 @@ jobs:
- name: Install dependencies
run: yarn install
- name: Run unit tests
id: test_units
run: npx jest

# Target for PR Merge Check
Expand Down Expand Up @@ -154,7 +148,6 @@ jobs:
platforms: linux/arm64
context: "."
cache-to: type=gha,scope=arm64,mode=max
cache-from: type=gha,scope=arm64
target: production
push: false

Expand Down Expand Up @@ -187,7 +180,6 @@ jobs:
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT

- name: Build and push docker images
id: push-prod
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
Expand Down

0 comments on commit 5db6ebd

Please sign in to comment.