Skip to content

Commit

Permalink
Merge branch 'develop' into feature/1557
Browse files Browse the repository at this point in the history
  • Loading branch information
EmiM committed Aug 11, 2023
2 parents 7510cab + 09f0e44 commit ee91ad1
Show file tree
Hide file tree
Showing 26 changed files with 228 additions and 266 deletions.
129 changes: 2 additions & 127 deletions .github/workflows/e2e-crossplatform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,130 +7,5 @@ jobs:
linux:
uses: ./.github/workflows/e2e-linux.yml
windows:
runs-on: windows-2019
timeout-minutes: 180
env:
ELECTRON_CUSTOM_VERSION: 23.0.0
TEST_MODE: true

steps:
- uses: actions/checkout@v2

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

- name: "Fetch jsign"
shell: bash
run: cd packages/desktop && curl https://zbay-binaries.s3.us-east-2.amazonaws.com/jsign/jsign-2.1.jar --output ./jsign-2.1.jar


- name: "Add Windows certificate"
id: write_file
uses: TryQuiet/base64-to-file@main
with:
fileName: 'win-certificate.pfx'
encodedString: ${{ secrets.WIN_CSC_LINK }}

- name: "Remove test files workaround (jest types conflicting with cypress types)"
run: find packages/desktop/src -name '*.test.*' -delete
shell: bash

- name: Before build
uses: ./.github/actions/before-build
with:
source-path: win32

- name: 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: Extract version
id: extract_version
uses: Saionaro/[email protected]
with:
path: packages/desktop

- name: 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: Chmod
working-directory: ./packages/desktop/dist
run: chmod +x "$FILE_NAME"
shell: bash

- name: "Upload built app"
uses: actions/upload-artifact@v2
with:
name: quiet-windows
path: ./packages/desktop/dist/Quiet Setup ${{ steps.extract_version.outputs.version }}.exe
retention-days: 2

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

- name: Kill Quiet
run: Stop-Process -Name "Quiet" -Force
shell: powershell

- name: Kill tor
run: Stop-Process -Name "tor" -Force
shell: powershell

- name: Delay
run: Start-Sleep -Seconds 10
shell: powershell

- name: Run one client test
uses: nick-fields/retry@v2
with:
timeout_minutes: 15
max_attempts: 3
shell: bash
command: cd packages/e2e-tests && npm run test oneClient.test.ts

# # Old prod version
# - name: Rename latest quiet
# run: cd $env:LOCALAPPDATA/programs; rename-item quiet quiet2
# shell: powershell

# - name: Download EXE
# run: curl -LO https://github.com/TryQuiet/quiet/releases/download/quiet%401.2.0/Quiet.Setup.1.2.0.exe
# shell: bash

# - name: Chmod
# run: chmod +x Quiet.Setup.1.2.0.exe
# shell: bash

# - name: Install exe
# run: Start-Process Quiet.Setup.1.2.0.exe -Wait
# shell: powershell

# - name: Kill Quiet
# run: Stop-Process -Name "Quiet" -Force
# shell: powershell

# - name: Kill tor
# run: Stop-Process -Name "tor" -Force
# shell: powershell

# - name: Delay
# run: Start-Sleep -Seconds 10
# shell: powershell
# # Old prod version

# - name: Run Backwards Compatibility test
# working-directory: ./packages/e2e-tests
# run: npm run test backwardsCompatibility.test.ts

uses: ./.github/workflows/e2e-win.yml

42 changes: 28 additions & 14 deletions .github/workflows/e2e-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ jobs:
env:
ELECTRON_CUSTOM_VERSION: 23.0.0
TEST_MODE: true
E2E: true

steps:
- uses: actions/checkout@v2
Expand All @@ -22,13 +23,6 @@ jobs:
shell: bash
run: cd packages/desktop && curl https://zbay-binaries.s3.us-east-2.amazonaws.com/jsign/jsign-2.1.jar --output ./jsign-2.1.jar

- name: "Add Windows certificate"
id: write_file
uses: TryQuiet/base64-to-file@main
with:
fileName: 'win-certificate.pfx'
encodedString: ${{ secrets.WIN_CSC_LINK }}

- name: "Remove test files workaround (jest types conflicting with cypress types)"
run: find packages/desktop/src -name '*.test.*' -delete
shell: bash
Expand All @@ -39,10 +33,6 @@ jobs:
source-path: win32

- name: 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
Expand All @@ -63,26 +53,50 @@ jobs:
run: chmod +x "$FILE_NAME"
shell: bash

- name: "Upload built app"
uses: actions/upload-artifact@v2
with:
name: quiet-windows
path: ./packages/desktop/dist/Quiet Setup ${{ steps.extract_version.outputs.version }}.exe
retention-days: 2

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

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

- name: Kill tor
run: Stop-Process -Name "tor" -Force
shell: powershell

- name: Delay
run: Start-Sleep -Seconds 10
shell: powershell

- name: Run one client test
uses: nick-fields/retry@v2
with:
timeout_minutes: 15
max_attempts: 3
shell: bash
command: cd packages/e2e-tests && npm run test oneClient.test.ts

- name: Run two clients test
uses: nick-fields/retry@v2
with:
timeout_minutes: 30
max_attempts: 3
shell: bash
command: cd packages/e2e-tests && npm run test twoClients.test.ts

- name: Run invitation link test - Includes 2 separate application clients
uses: nick-fields/retry@v2
with:
timeout_minutes: 25
max_attempts: 3
command: cd packages/e2e-tests && npm run test twoClients.test.ts
shell: bash
command: cd packages/e2e-tests && npm run test invitationLink.test.ts
8 changes: 8 additions & 0 deletions packages/backend/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [1.7.1-alpha.2](https://github.com/TryQuiet/backend/compare/@quiet/[email protected]...@quiet/[email protected]) (2023-08-11)

**Note:** Version bump only for package @quiet/backend





## [1.7.1-alpha.1](https://github.com/TryQuiet/backend/compare/@quiet/[email protected]...@quiet/[email protected]) (2023-08-08)

**Note:** Version bump only for package @quiet/backend
Expand Down
4 changes: 2 additions & 2 deletions packages/backend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/backend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@quiet/backend",
"version": "1.7.1-alpha.1",
"version": "1.7.1-alpha.2",
"description": "tlg-manager",
"types": "lib/index.d.ts",
"type": "module",
Expand Down Expand Up @@ -54,7 +54,7 @@
"@nestjs/schematics": "^10.0.0",
"@nestjs/testing": "^10.0.0",
"@quiet/eslint-config": "^1.1.0",
"@quiet/state-manager": "^1.7.0",
"@quiet/state-manager": "^1.7.1-alpha.0",
"@types/crypto-js": "^4.0.2",
"@types/express": "^4.17.9",
"@types/jest": "28.1.8",
Expand Down
8 changes: 8 additions & 0 deletions packages/desktop/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [1.7.1-alpha.2](https://github.com/TryQuiet/quiet/compare/[email protected]@1.7.1-alpha.2) (2023-08-11)

**Note:** Version bump only for package quiet





## [1.7.1-alpha.1](https://github.com/TryQuiet/quiet/compare/[email protected]@1.7.1-alpha.1) (2023-08-08)

**Note:** Version bump only for package quiet
Expand Down
4 changes: 2 additions & 2 deletions packages/desktop/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
},
"homepage": "https://github.com/TryQuiet",
"@comment version": "To build new version for specific platform, just replace platform in version tag to one of following linux, mac, windows",
"version": "1.7.1-alpha.1",
"version": "1.7.1-alpha.2",
"description": "Decentralized team chat",
"main": "dist/main/main.js",
"scripts": {
Expand Down Expand Up @@ -155,7 +155,7 @@
"@mui/material": "~5.10.15",
"@quiet/eslint-config": "^1.1.0",
"@quiet/identity": "^1.6.0",
"@quiet/state-manager": "^1.7.0",
"@quiet/state-manager": "^1.7.1-alpha.0",
"@redux-saga/types": "^1.1.0",
"@reduxjs/toolkit": "^1.9.1",
"@sentry/browser": "^6.19.7",
Expand Down
6 changes: 5 additions & 1 deletion packages/desktop/scripts/sign.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
exports.default = async function (configuration) {
if (process.env.E2E) {
console.log('E2E workflow - no need to sign')
return
}
console.log('config', configuration.path)
require('child_process').execSync(
`java \
Expand All @@ -11,7 +15,7 @@ exports.default = async function (configuration) {
"${configuration.path}"
`,
{
stdio: 'inherit'
stdio: 'inherit',
}
)
}
8 changes: 8 additions & 0 deletions packages/e2e-tests/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [1.6.1-alpha.0](https://github.com/TryQuiet/quiet/compare/[email protected]@1.6.1-alpha.0) (2023-08-11)

**Note:** Version bump only for package e2e-tests





# [1.6.0](https://github.com/ZbayApp/monorepo/compare/[email protected]@1.6.0) (2023-07-28)

**Note:** Version bump only for package e2e-tests
Expand Down
4 changes: 2 additions & 2 deletions packages/e2e-tests/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/e2e-tests/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "e2e-tests",
"version": "1.6.0",
"version": "1.6.1-alpha.0",
"description": "For running end to end tests we use Selenium WebDriver (https://www.selenium.dev/documentation/webdriver/) with Electron ChromeDriver (https://www.npmjs.com/package/electron-chromedriver) in Jest",
"main": "index.js",
"scripts": {
Expand Down
Loading

0 comments on commit ee91ad1

Please sign in to comment.