Skip to content

Commit

Permalink
Merge branch 'develop' into lerna/7.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
EmiM committed Nov 3, 2023
2 parents e412d96 + b0c6e2d commit 29f211e
Show file tree
Hide file tree
Showing 182 changed files with 5,260 additions and 4,103 deletions.
Binary file not shown.
54 changes: 9 additions & 45 deletions .github/workflows/desktop-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,20 @@ on:
[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:
Expand Down Expand Up @@ -196,51 +205,6 @@ jobs:
with:
source-path: win32

#E2E - Start
# - name: E2E - electron-builder
# env:
# CERTIFICATE_PATH: ${{ steps.write_file.outputs.filePath }}
# WIN_CSC_KEY_PASSWORD: ${{ secrets.WIN_CSC_KEY_PASSWORD }}
# WINDOWS_ALIAS: ${{ secrets.WIN_ALIAS }}
# working-directory: ./packages/desktop
# run: node_modules/.bin/electron-builder --win
# shell: bash

# - name: E2E - Extract version
# id: extract_version
# uses: Saionaro/[email protected]
# with:
# path: packages/desktop

# - name: E2E - FILE_NAME env
# working-directory: ./packages/desktop/dist
# run: echo "FILE_NAME=Quiet Setup ${{ steps.extract_version.outputs.version }}.exe" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
# shell: powershell

# - name: E2E - Chmod
# working-directory: ./packages/desktop/dist
# run: chmod +x "$FILE_NAME"
# shell: bash

# - name: E2E - Install exe
# run: Start-Process "Quiet Setup ${{ steps.extract_version.outputs.version }}.exe" -Wait
# working-directory: ./packages/desktop/dist
# shell: powershell

# - name: E2E - Kill exe
# run: Stop-Process -Name "Quiet" -Force
# working-directory: ./packages/desktop/dist
# shell: powershell

# - name: E2E - Run smoke test
# uses: nick-fields/retry@v2
# with:
# timeout_minutes: 25
# max_attempts: 3
# shell: bash
# command: cd packages/e2e-tests && npm run test smoke.crossplatform.test.ts
#E2E - End

- name: "Set electron-builder props"
shell: bash
run: echo "ELECTRON_BUILDER_PROPS=-c.publish.bucket=$S3_BUCKET" >> $GITHUB_ENV
Expand Down
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
39 changes: 39 additions & 0 deletions .github/workflows/e2e-ios.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: E2E iOS

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

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

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: Install pods
run: |
cd packages/mobile/ios
pod install
- name: Build Detox
run: |
cd packages/mobile
detox build -c ios.sim.debug.ci
- name: Run basic tests
run: |
cd packages/mobile
detox test starter -c ios.sim.debug.ci
6 changes: 3 additions & 3 deletions .github/workflows/e2e-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:

strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04]
os: [ubuntu-latest-m]

timeout-minutes: 180

Expand Down Expand Up @@ -74,10 +74,10 @@ jobs:
- name: Chmod App Image 1.2.0
working-directory: ./packages/e2e-tests/Quiet
run: chmod +x Quiet-1.2.0.AppImage

- name: Run Backwards Compatibility test
uses: nick-fields/retry@v2
with:
timeout_minutes: 15
max_attempts: 3
command: cd packages/e2e-tests && npm run test backwardsCompatibility.test.ts
command: cd packages/e2e-tests && npm run test backwardsCompatibility.test.ts
13 changes: 9 additions & 4 deletions .github/workflows/e2e-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: E2E Windows
on: [workflow_call]
jobs:
windows:
runs-on: windows-2019
runs-on: windows-latest-l

timeout-minutes: 180

env:
Expand Down Expand Up @@ -36,7 +36,7 @@ jobs:

- name: electron-builder
working-directory: ./packages/desktop
run: node_modules/.bin/electron-builder --win
run: node_modules/.bin/electron-builder --win
shell: bash

- name: Extract version
Expand Down Expand Up @@ -66,10 +66,15 @@ jobs:
run: Start-Process "Quiet Setup ${{ steps.extract_version.outputs.version }}.exe" -Wait
working-directory: ./packages/desktop/dist
shell: powershell

- name: Check if Quiet installed properly
run: Get-ChildItem -Path C:\Users\runneradmin\AppData\Local\Programs\@quietdesktop
shell: powershell

- name: Kill Quiet
run: Get-Process -Name "Quiet" -ErrorAction SilentlyContinue | Stop-Process -Force
shell: powershell
if: always()

- name: Kill tor
run: Get-Process -Name "tor" -ErrorAction SilentlyContinue | Stop-Process -Force
Expand Down Expand Up @@ -101,4 +106,4 @@ jobs:
timeout_minutes: 25
max_attempts: 3
shell: bash
command: cd packages/e2e-tests && npm run test invitationLink.test.ts
command: cd packages/e2e-tests && npm run test invitationLink.test.ts
13 changes: 7 additions & 6 deletions .github/workflows/mobile-deploy-android.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,19 @@ name: Deploy Android to Google Play

on:
release:
types:
types:
[prereleased, released]

jobs:
build-android:
# needs: detox-android
runs-on: ${{ matrix.os }}
if: |
startsWith(github.ref, 'refs/tags/@quiet/mobile')
strategy:
matrix:
os: [ubuntu-20.04]
os: [ubuntu-latest-m]

steps:
- name: "Print OS"
Expand All @@ -33,21 +34,21 @@ jobs:
with:
ndk-version: r21e
add-to-path: false

- 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/mobile,backend-bundle"

- name: "Create gradle configuration directory"
run: mkdir -p $HOME/.gradle

- name: "Prepare ndk configuration"
run: |
printf "\
NDK_PATH=${{ steps.setup-ndk.outputs.ndk-path }}\n\
" > $HOME/.gradle/gradle.properties
- name: "Prepare signing configuration"
run: |
printf "\
Expand Down Expand Up @@ -76,7 +77,7 @@ jobs:
mkdir -p distribution/whatsnew
git log -1 --pretty=format:%s > distribution/whatsnew/whatsnew-pl-PL
echo ${{ SECRETS.SERVICE_ACCOUNT_JSON }} | base64 --decode > google-play.json
- name: "Upload to Google Play"
uses: r0adkll/[email protected]
with:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/mobile-deploy-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:

jobs:
build-ios:
# needs: detox-ios
runs-on: ${{ matrix.os }}
if: |
startsWith(github.ref, 'refs/tags/@quiet/mobile')
Expand Down
29 changes: 28 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,32 @@
[2.0.3-alpha.0]

[unreleased]
* Filter CSRs - remove old csrs and replace with new for each pubkey

* Fixed mobile bugs - joining by QR code and not showing username taken screen for user who has unique name

* Use context menu for information about unregistered username instead screen

* Shorter dots-placeholder for invite link

* Display a shorter invite link on a mobile

* Removed registration attempts selector and corresponding usage.

* Revert adjusting bootstrap scripts for developing on Windows

* Channel input - replaced ContentEditable with textarea

* Fix - up/down arrows now work properly inside channel input (textarea)

[2.0.1-alpha.2]

* UI layer for taken usernames for desktop and mobile

* Change nickname for taken username

* Map messages sent before changing username

* Update registrar service to match new registration flow.

* Add possible impersonation attack UI for desktop and mobile

Expand Down
50 changes: 50 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Contributing

## Development workflow

> **New to open source?** You can learn how from this _free_ series: [How to Contribute to an Open Source Project on GitHub](https://egghead.io/courses/how-to-contribute-to-an-open-source-project-on-github).
1. Fork the repo and create your branch from `develop` (a guide on [how to fork a repository](https://help.github.com/articles/fork-a-repo/)).
2. Being in the root directory, run `npm i` and then `lerna bootstrap`, to setup the development environment.
3. Check out [desktop](https://github.com/TryQuiet/quiet/blob/develop/packages/desktop/README.md) and [mobile](https://github.com/TryQuiet/quiet/blob/develop/packages/mobile/README.md) README.md for more instructions.

## Commit message convention

Prefix commit messages with one of the following to signify the kind of change:

- `fix:` bug fixes, e.g. fix incorrect error message.
- `feat:` new features, e.g. add useful API.
- `refactor:` code/structure refactor, e.g. new folder structure.
- `docs:` changes into documentation, e.g. add usage example for getByText.
- `test:` adding or updating tests, eg unit, snapshot testing.
- `chore:` tooling changes, e.g. change circle ci config.
- `BREAKING:` for changes that break existing usage, e.g. change API.

Commit message should be followed by the issue number, eg.
`fix: typo #2002`

### (optional) Setting up a local git hook for verifying message convention:

1. Navigate to git repository in your terminal.
2. Go to the .git/hooks directory:
```
cd .git/hooks
```
3. Create (or edit if it already exists) the commit-msg file
4. Make the file executable:
```
chmod +x commit-msg
```
5. Edit the commit-msg file and paste the following shell script:
```
#!/bin/bash
COMMIT_MSG_FILE=$1
COMMIT_MSG=$(cat $COMMIT_MSG_FILE)
if ! echo "$COMMIT_MSG" | grep -E '^(fix:|feat:|refactor:|docs:|test:|chore:|BREAKING:|Publish)' > /dev/null; then
echo "error: invalid commit message format"
echo "Valid formats are fix: feat: refactor: docs: test: chore: BREAKING:"
exit 1
fi
```
Loading

0 comments on commit 29f211e

Please sign in to comment.