Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test-visual-regressions #2599

Closed
wants to merge 20 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 7 additions & 21 deletions .github/workflows/backend-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Backend unit tests

on:
pull_request:
workflow_dispatch:

jobs:
unit-tests:
Expand All @@ -19,26 +20,21 @@ jobs:
backend:
- 'packages/backend/**'
- name: "Skip tests"
if: steps.filter.outputs.backend == 'false'
run: |
echo "Skipping test run"
exit 0
echo "Skipping test run"


- name: "Print OS"
if: steps.filter.outputs.backend == 'true'
run: echo ${{ matrix.os }}

- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
if: steps.filter.outputs.backend == 'true'

- name: "Setup environment"
if: steps.filter.outputs.backend == 'true'
uses: ./.github/actions/setup-env
with:
bootstrap-packages: "@quiet/eslint-config,@quiet/logger,@quiet/common,@quiet/types,@quiet/state-manager,@quiet/backend,@quiet/identity,backend-bundle"

- name: "Unit tests"
if: steps.filter.outputs.backend == 'true'
run: lerna run test-ci --scope @quiet/backend --stream

long-running-tests:
Expand All @@ -56,26 +52,21 @@ jobs:
backend:
- 'packages/backend/**'
- name: "Skip tests"
if: steps.filter.outputs.backend == 'false'
run: |
echo "Skipping test run"
exit 0
echo "Skipping test run"


- name: "Print OS"
if: steps.filter.outputs.backend == 'true'
run: echo ${{ matrix.os }}

- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
if: steps.filter.outputs.backend == 'true'

- name: "Setup environment"
if: steps.filter.outputs.backend == 'true'
uses: ./.github/actions/setup-env
with:
bootstrap-packages: "@quiet/eslint-config,@quiet/logger,@quiet/common,@quiet/types,@quiet/state-manager,@quiet/backend,@quiet/identity,backend-bundle"

- name: "Unit tests"
if: steps.filter.outputs.backend == 'true'
run: lerna run test-ci-long-running --scope @quiet/backend --stream

unit-tests-with-tor:
Expand All @@ -93,24 +84,19 @@ jobs:
backend:
- 'packages/backend/**'
- name: "Skip tests"
if: steps.filter.outputs.backend == 'false'
run: |
echo "Skipping test run"
exit 0
echo "Skipping test run"


- name: "Print OS"
if: steps.filter.outputs.backend == 'true'
run: echo ${{ matrix.os }}

- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
if: steps.filter.outputs.backend == 'true'

- name: "Setup environment"
if: steps.filter.outputs.backend == 'true'
uses: ./.github/actions/setup-env
with:
bootstrap-packages: "@quiet/eslint-config,@quiet/logger,@quiet/common,@quiet/types,@quiet/state-manager,@quiet/backend,@quiet/identity,backend-bundle"

- name: "Unit tests"
if: steps.filter.outputs.backend == 'true'
run: lerna run test-ci-tor --scope @quiet/backend --stream
10 changes: 3 additions & 7 deletions .github/workflows/check-desktop-visual-regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Desktop visual regressions

on:
pull_request:
workflow_dispatch:

jobs:
chromatic-deployment:
Expand All @@ -19,29 +20,24 @@ jobs:
desktop:
- 'packages/desktop/**'
- name: "Skip tests"
if: steps.filter.outputs.desktop == 'false'
run: |
echo "Skipping test run"
exit 0
echo "Skipping test run"
#

- name: "Print OS"
if: steps.filter.outputs.desktop == 'true'
run: echo ${{ matrix.os }}

- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
if: steps.filter.outputs.desktop == 'true'
with:
fetch-depth: 0 # Required to retrieve git history

- name: Setup environment
uses: ./.github/actions/setup-env
if: steps.filter.outputs.desktop == 'true'
with:
bootstrap-packages: "@quiet/eslint-config,@quiet/logger,@quiet/common,@quiet/types,@quiet/state-manager,@quiet/backend,@quiet/identity,@quiet/desktop,backend-bundle"

- name: "Publish to Chromatic"
uses: chromaui/action@355e2a05a179e9e89c2b237dcd55adbeb89e577e # v1
if: steps.filter.outputs.desktop == 'true'
with:
workingDir: ./packages/desktop
token: ${{ secrets.GH_TOKEN }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Check

on:
pull_request:
workflow_dispatch:

jobs:
check:
Expand Down
10 changes: 3 additions & 7 deletions .github/workflows/desktop-rtl-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Desktop - state-manager bracket tests (RTL)

on:
pull_request:
workflow_dispatch:

jobs:
desktop-tests:
Expand All @@ -21,25 +22,20 @@ jobs:
- 'packages/desktop/**'
- 'packages/state-manger/**'
- name: "Skip tests"
if: steps.filter.outputs.validFiles == 'false'
run: |
echo "Skipping test run"
exit 0
echo "Skipping test run"


- name: "Print OS"
if: steps.filter.outputs.validFiles == 'true'
run: echo ${{ matrix.os }}

- uses: actions/checkout@v3
if: steps.filter.outputs.validFiles == 'true'

- name: "Setup environment"
uses: ./.github/actions/setup-env
if: steps.filter.outputs.validFiles == 'true'
with:
cachePrefix: "desktop-tests"
bootstrap-packages: "@quiet/eslint-config,@quiet/logger,@quiet/common,@quiet/types,@quiet/state-manager,@quiet/backend,@quiet/identity,@quiet/desktop,backend-bundle"

- name: "Desktop - state-manager bracket tests"
if: steps.filter.outputs.validFiles == 'true'
run: lerna run rtl-test --scope @quiet/desktop --stream
13 changes: 3 additions & 10 deletions .github/workflows/desktop-test-scroll.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Desktop scroll regression tests

on:
pull_request:
workflow_dispatch:

jobs:
regression-tests:
Expand All @@ -20,41 +21,33 @@ jobs:
desktop:
- 'packages/desktop/**'
- name: "Skip tests"
if: steps.filter.outputs.desktop == 'false'
run: |
echo "Skipping test run"
exit 0
echo "!Skipping test run"


- name: "Print OS"
if: steps.filter.outputs.desktop == 'true'
run: echo ${{ matrix.os }}

- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
if: steps.filter.outputs.desktop == 'true'

- name: Setup environment
uses: ./.github/actions/setup-env
if: steps.filter.outputs.desktop == 'true'
with:
bootstrap-packages: "@quiet/eslint-config,@quiet/logger,@quiet/common,@quiet/types,@quiet/state-manager,@quiet/backend,@quiet/identity,@quiet/desktop,backend-bundle"

- name: "Install libs"
if: steps.filter.outputs.desktop == 'true'
run: sudo apt-get update && sudo apt-get install -y libgtk2.0-0 libgtk-3-0 libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb

- name: "Remove test files workaround"
if: steps.filter.outputs.desktop == 'true'
run: find packages/desktop/src -name '*.test.*' -delete && find packages/backend/src -name '*.test.*' -delete

- uses: cypress-io/github-action@1b70233146622b69e789ccdd4f9452adc638d25a # v6.6.1
if: steps.filter.outputs.desktop == 'true'
with:
install: false
command: npm run regression-test:ci
working-directory: packages/desktop

- name: Archive test screenshots
if: steps.filter.outputs.desktop == 'true'
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with:
name: test-screenshots-linux
Expand Down
10 changes: 3 additions & 7 deletions .github/workflows/desktop-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Desktop tests

on:
pull_request:
workflow_dispatch:

jobs:
desktop-tests:
Expand All @@ -20,25 +21,20 @@ jobs:
desktop:
- 'packages/desktop/**'
- name: "Skip tests"
if: steps.filter.outputs.desktop == 'false'
run: |
echo "Skipping test run"
exit 0
echo "Skipping test run"


- name: "Print OS"
if: steps.filter.outputs.desktop == 'true'
run: echo ${{ matrix.os }}

- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
if: steps.filter.outputs.desktop == 'true'

- name: "Setup environment"
uses: ./.github/actions/setup-env
if: steps.filter.outputs.desktop == 'true'
with:
cachePrefix: "desktop-tests"
bootstrap-packages: "@quiet/eslint-config,@quiet/logger,@quiet/common,@quiet/types,@quiet/state-manager,@quiet/backend,@quiet/identity,@quiet/desktop,backend-bundle"

- name: "Unit tests"
if: steps.filter.outputs.desktop == 'true'
run: lerna run test --scope @quiet/desktop --stream
14 changes: 7 additions & 7 deletions .github/workflows/e2e-ios-self.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: Detox E2E iOS (self-hosted)

on:
# push:
# paths:
# - packages/mobile/**
# - packages/backend/**
# - packages/state-manager/**
# - .github/workflows/e2e-ios-self.yml
push:
paths:
- packages/mobile/**
- packages/backend/**
- packages/state-manager/**
- .github/workflows/e2e-ios-self.yml

jobs:
detox-ios-self-hosted:
Expand Down Expand Up @@ -47,5 +47,5 @@ jobs:
detox test starter -c ios.sim.debug.ci

- name: Stop metro
if: always()
if: always()
run: pm2 stop METRO
10 changes: 5 additions & 5 deletions .github/workflows/e2e-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,21 +51,21 @@ jobs:
uses: nick-fields/retry@14672906e672a08bd6eeb15720e9ed3ce869cdd4 # v2.9.0
with:
timeout_minutes: 15
max_attempts: 3
max_attempts: 1
command: cd packages/e2e-tests && npm run test oneClient.test.ts

- name: Run multiple clients test
uses: nick-fields/retry@14672906e672a08bd6eeb15720e9ed3ce869cdd4 # v2.9.0
with:
timeout_minutes: 25
max_attempts: 3
max_attempts: 1
command: cd packages/e2e-tests && npm run test multipleClients.test.ts

- name: Run user profile test
uses: nick-fields/retry@v2
with:
timeout_minutes: 25
max_attempts: 3
max_attempts: 1
command: cd packages/e2e-tests && npm run test userProfile.test.ts

- name: Run invitation link test - Includes 2 separate application clients
Expand All @@ -78,6 +78,6 @@ jobs:
- name: Run Backwards Compatibility test
uses: nick-fields/retry@14672906e672a08bd6eeb15720e9ed3ce869cdd4 # v2.9.0
with:
timeout_minutes: 15
max_attempts: 3
timeout_minutes: 30
max_attempts: 1
command: cd packages/e2e-tests && npm run test backwardsCompatibility.test.ts
14 changes: 7 additions & 7 deletions .github/workflows/e2e-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,27 +55,27 @@ jobs:
- name: Run invitation link test - Includes 2 separate application clients
uses: nick-fields/retry@14672906e672a08bd6eeb15720e9ed3ce869cdd4 # v2.9.0
with:
timeout_minutes: 25
max_attempts: 3
timeout_minutes: 180
max_attempts: 1
command: cd packages/e2e-tests && npm run test invitationLink.test.ts

- name: Run one client test
uses: nick-fields/retry@14672906e672a08bd6eeb15720e9ed3ce869cdd4 # v2.9.0
with:
timeout_minutes: 15
max_attempts: 3
timeout_minutes: 180
max_attempts: 1
command: cd packages/e2e-tests && npm run test oneClient.test.ts

- name: Run multiple clients test
uses: nick-fields/retry@14672906e672a08bd6eeb15720e9ed3ce869cdd4 # v2.9.0
with:
timeout_minutes: 25
max_attempts: 3
timeout_minutes: 180
max_attempts: 1
command: cd packages/e2e-tests && npm run test multipleClients.test.ts

- name: Run user profile test
uses: nick-fields/retry@14672906e672a08bd6eeb15720e9ed3ce869cdd4 # v2.9.0
with:
timeout_minutes: 25
max_attempts: 3
max_attempts: 1
command: cd packages/e2e-tests && npm run test userProfile.test.ts
Loading
Loading