Skip to content

Commit

Permalink
Merge branch 'develop' into feature/1839
Browse files Browse the repository at this point in the history
  • Loading branch information
Kacper-RF committed Oct 16, 2023
2 parents ee6d53d + eb2caab commit 8cf2fc5
Show file tree
Hide file tree
Showing 225 changed files with 5,197 additions and 2,160 deletions.
2 changes: 1 addition & 1 deletion .github/actions/before-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@ runs:
shell: bash

- name: "Build the project"
run: lerna run build:prod --scope quiet
run: lerna run build:prod --scope @quiet/desktop
shell: bash
9 changes: 8 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,11 @@
### Pull Request Checklist

- [ ] I have linked this PR to related GitHub issue.
- [ ] I have updated the CHANGELOG.md file with relevant changes (the file is located at the root of monorepo).
- [ ] I have updated the CHANGELOG.md file with relevant changes (the file is located at the root of monorepo).

### (Optional) Mobile checklist

Please ensure you completed the following checks if you did any changes to the mobile package:

- [ ] I have run e2e tests for mobile
- [ ] I have updated base screenshots for visual regression tests
5 changes: 3 additions & 2 deletions .github/secrets/decrypt_secrets.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#!/bin/sh

set -e

gpg --quiet --batch --yes --decrypt --passphrase="$IOS_PROFILE_KEY" --output ./.github/secrets/match_AppStore_comquietmobile.mobileprovision ./.github/secrets/match_AppStore_comquietmobile.mobileprovision.gpg
gpg --quiet --batch --yes --decrypt --passphrase="$IOS_CERTIFICATE_KEY" --output ./.github/secrets/Certificates.p12 ./.github/secrets/Certificates.p12.gpg

mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles

cp ./.github/secrets/match_AppStore_comquietmobile.mobileprovision ~/Library/MobileDevice/Provisioning\ Profiles/654a2214-095f-4939-a9e5-09f7a2ccf530.mobileprovision
cp ./.github/secrets/match_AppStore_comquietmobile.mobileprovision ~/Library/MobileDevice/Provisioning\ Profiles/718ac015-309f-49b6-9653-f6cf84a6377c.mobileprovision


security create-keychain -p "" build.keychain
Expand All @@ -17,4 +19,3 @@ security unlock-keychain -p "" ~/Library/Keychains/build.keychain
security set-keychain-settings ~/Library/Keychains/build.keychain #this removes autolock

security set-key-partition-list -S apple-tool:,apple: -s -k "" ~/Library/Keychains/build.keychain

Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: "Print OS"
run: echo ${{ matrix.os }}

- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: "Setup environment"
uses: ./.github/actions/setup-env
Expand All @@ -38,7 +38,7 @@ jobs:
- name: "Print OS"
run: echo ${{ matrix.os }}

- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: "Setup environment"
uses: ./.github/actions/setup-env
Expand All @@ -59,7 +59,7 @@ jobs:
- name: "Print OS"
run: echo ${{ matrix.os }}

- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: "Setup environment"
uses: ./.github/actions/setup-env
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Visual regressions
name: Desktop visual regressions

on:
pull_request:
Expand All @@ -17,14 +17,14 @@ jobs:
- name: "Print OS"
run: echo ${{ matrix.os }}

- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Required to retrieve git history

- name: Setup environment
uses: ./.github/actions/setup-env
with:
bootstrap-packages: "@quiet/eslint-config,@quiet/logger,@quiet/common,@quiet/types,@quiet/state-manager,@quiet/backend,@quiet/identity,quiet,backend-bundle"
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@v1
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: "Print OS"
run: echo ${{ matrix.os }}

- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: "Remove test files workaround (jest types conflicting with cypress types)"
if: ${{ runner.os == 'Windows' }}
Expand All @@ -27,14 +27,13 @@ jobs:
uses: ./.github/actions/setup-env
if: ${{ runner.os != 'Windows' }}
with:
bootstrap-packages: "@quiet/eslint-config,@quiet/logger,@quiet/common,@quiet/types,@quiet/state-manager,@quiet/backend,@quiet/identity,quiet,@quiet/mobile,e2e-tests,backend-bundle"
bootstrap-packages: "@quiet/eslint-config,@quiet/logger,@quiet/common,@quiet/types,@quiet/state-manager,@quiet/backend,@quiet/identity,@quiet/desktop,@quiet/mobile,e2e-tests,backend-bundle"


- name: "Setup environment for Windows"
uses: ./.github/actions/setup-env
if: ${{ runner.os == 'Windows' }}
with:
bootstrap-packages: "@quiet/eslint-config,@quiet/logger,@quiet/common,@quiet/types,@quiet/state-manager,@quiet/backend,@quiet/identity,quiet,e2e-tests,backend-bundle"
bootstrap-packages: "@quiet/eslint-config,@quiet/logger,@quiet/common,@quiet/types,@quiet/state-manager,@quiet/backend,@quiet/identity,@quiet/desktop,e2e-tests,backend-bundle"

- name: "Lint"
if: ${{ runner.os != 'Windows' }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@a09933a12a80f87b87005513f0abb1494c27a716 # v2.21.4
uses: github/codeql-action/init@ddccb873888234080b77e9bc2d4764d5ccaaccf9 # v2.21.9
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -55,7 +55,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@a09933a12a80f87b87005513f0abb1494c27a716 # v2.21.4
uses: github/codeql-action/autobuild@ddccb873888234080b77e9bc2d4764d5ccaaccf9 # v2.21.9

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
Expand All @@ -68,6 +68,6 @@ jobs:
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@a09933a12a80f87b87005513f0abb1494c27a716 # v2.21.4
uses: github/codeql-action/analyze@ddccb873888234080b77e9bc2d4764d5ccaaccf9 # v2.21.9
with:
category: "/language:${{matrix.language}}"
4 changes: 2 additions & 2 deletions .github/workflows/depencency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- name: 'Dependency Review'
uses: actions/dependency-review-action@0efb1d1d84fc9633afcdaad14c485cbbc90ef46c # v2.5.1
uses: actions/dependency-review-action@6c5ccdad469c9f8a2996bfecaec55a631a347034 # v3.1.0
Original file line number Diff line number Diff line change
@@ -1,36 +1,45 @@
name: Build release
name: Desktop release build

on:
release:
types:
[released, prereleased]

jobs:

run-e2e-tests-linux:
if: |
startsWith(github.ref, 'refs/tags/@quiet/desktop')
uses: ./.github/workflows/e2e-linux.yml

run-e2e-tests-mac:
if: |
startsWith(github.ref, 'refs/tags/@quiet/desktop')
uses: ./.github/workflows/e2e-mac.yml

run-e2e-tests-win:
if: |
startsWith(github.ref, 'refs/tags/@quiet/desktop')
uses: ./.github/workflows/e2e-win.yml

build-linux:
# needs: run-e2e-tests-linux
runs-on: ubuntu-22.04
if: |
startsWith(github.ref, 'refs/tags/quiet')
startsWith(github.ref, 'refs/tags/@quiet/desktop')
env:
TEST_MODE: ${{ github.event.action == 'prereleased' }}
S3_BUCKET: ${{ github.event.action == 'released' && 'quiet' || 'test.quiet' }}
CHECKSUM_PATH: ${{ github.event.action == 'released' && 'packages/desktop/dist/latest-linux.yml' || 'packages/desktop/dist/alpha-linux.yml' }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

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

- name: Install libfuse
run: sudo apt install libfuse2
Expand All @@ -52,7 +61,7 @@ jobs:
run: cd packages/desktop && USE_HARD_LINKS=false node_modules/.bin/electron-builder -p always --linux ${{ env.ELECTRON_BUILDER_PROPS }}

- name: "Calculate new checksum for electron updater"
run: lerna run postBuild --scope quiet
run: lerna run postBuild --scope @quiet/desktop

- name: "Push electron-updater new checksum to S3"
uses: vinkabuki/upload-s3-action@master
Expand Down Expand Up @@ -89,14 +98,14 @@ jobs:
# needs: run-e2e-tests-mac
runs-on: macos-latest
if: |
startsWith(github.ref, 'refs/tags/quiet')
startsWith(github.ref, 'refs/tags/@quiet/desktop')
env:
TEST_MODE: ${{ github.event.action == 'prereleased' }}
S3_BUCKET: ${{ github.event.action == 'released' && 'quiet' || 'test.quiet' }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions-rs/components-nightly@v1
with:
Expand All @@ -111,7 +120,7 @@ jobs:
- name: Setup environment
uses: ./.github/actions/setup-env
with:
bootstrap-packages: "@quiet/eslint-config,@quiet/logger,@quiet/common,@quiet/types,@quiet/state-manager,@quiet/backend,@quiet/identity,quiet,backend-bundle"
bootstrap-packages: "@quiet/eslint-config,@quiet/logger,@quiet/common,@quiet/types,@quiet/state-manager,@quiet/backend,@quiet/identity,@quiet/desktop,backend-bundle"

- name: Before build
uses: ./.github/actions/before-build
Expand Down Expand Up @@ -162,14 +171,14 @@ jobs:
# needs: run-e2e-tests-win
runs-on: windows-2019
if: |
startsWith(github.ref, 'refs/tags/quiet')
startsWith(github.ref, 'refs/tags/@quiet/desktop')
env:
TEST_MODE: ${{ github.event.action == 'prereleased' }}
S3_BUCKET: ${{ github.event.action == 'released' && 'quiet' || 'test.quiet' }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: "Fetch jsign"
shell: bash
Expand All @@ -189,7 +198,7 @@ jobs:
- name: Setup environment
uses: ./.github/actions/setup-env
with:
bootstrap-packages: "@quiet/eslint-config,@quiet/logger,@quiet/common,@quiet/types,@quiet/state-manager,@quiet/backend,@quiet/identity,quiet,backend-bundle,e2e-tests"
bootstrap-packages: "@quiet/eslint-config,@quiet/logger,@quiet/common,@quiet/types,@quiet/state-manager,@quiet/backend,@quiet/identity,@quiet/desktop,backend-bundle,e2e-tests"

- name: Before build
uses: ./.github/actions/before-build
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/desktop-rtl-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Desktop - state-manager bracket tests (RTL)

on:
pull_request:
paths:
- packages/desktop/**
- packages/state-manager/**

jobs:
desktop-tests:
timeout-minutes: 25
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-20.04, macos-latest]

steps:
- name: "Print OS"
run: echo ${{ matrix.os }}

- uses: actions/checkout@v3

- name: "Setup environment"
uses: ./.github/actions/setup-env
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"
run: lerna run rtl-test --scope @quiet/desktop --stream
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Scroll regression tests
name: Desktop scroll regression tests

on:
pull_request:
Expand All @@ -18,20 +18,20 @@ jobs:
- name: "Print OS"
run: echo ${{ matrix.os }}

- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup environment
uses: ./.github/actions/setup-env
with:
bootstrap-packages: "@quiet/eslint-config,@quiet/logger,@quiet/common,@quiet/types,@quiet/state-manager,@quiet/backend,@quiet/identity,quiet,backend-bundle"
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"
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"
run: find packages/desktop/src -name '*.test.*' -delete && find packages/backend/src -name '*.test.*' -delete

- uses: cypress-io/github-action@v2
- uses: cypress-io/github-action@v6
with:
install: false
command: npm run regression-test:ci
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,13 @@ jobs:
- name: "Print OS"
run: echo ${{ matrix.os }}

- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: "Setup environment"
uses: ./.github/actions/setup-env
with:
cachePrefix: "desktop-tests"
bootstrap-packages: "@quiet/eslint-config,@quiet/logger,@quiet/common,@quiet/types,@quiet/state-manager,@quiet/backend,@quiet/identity,quiet,backend-bundle"
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"
run: lerna run test --scope quiet --stream

- name: "desktop-state-manager bracket tests"
run: lerna run rtl-test --scope quiet --stream
run: lerna run test --scope @quiet/desktop --stream
34 changes: 34 additions & 0 deletions .github/workflows/e2e-android.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: E2E Android

on:
push:
paths:
- packages/mobile/**

jobs:
detox-android:
timeout-minutes: 10
runs-on: [self-hosted, macOS, ARM64, android]

steps:
- uses: actions/checkout@v4

- name: Install dependencies
run: |
npm i
npm run lerna bootstrap --scope @quiet/eslint-config,@quiet/logger,@quiet/common,@quiet/types,@quiet/state-manager,@quiet/backend,@quiet/identity,@quiet/mobile,backend-bundle
- name: Pull binaries
run: |
git lfs install
git lfs pull
- name: Build Detox
run: |
cd packages/mobile
detox build -c android.emu.debug.ci
- name: Run basic tests
run: |
cd packages/mobile
detox test starter -c android.emu.debug.ci
Loading

0 comments on commit 8cf2fc5

Please sign in to comment.