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

Chore/lerna publishing config #1863

Merged
merged 23 commits into from
Oct 5, 2023
Merged
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
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
File renamed without changes.
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 @@ -24,7 +24,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: "Publish to Chromatic"
uses: chromaui/action@v1
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build release
name: Desktop release build

on:
release:
Expand All @@ -17,7 +17,7 @@ jobs:
# 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' }}
Expand All @@ -30,7 +30,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: Install libfuse
run: sudo apt install libfuse2
Expand All @@ -52,7 +52,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,7 +89,7 @@ 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' }}
Expand All @@ -111,7 +111,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,7 +162,7 @@ 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' }}
Expand All @@ -189,7 +189,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 @@ -23,7 +23,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: "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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,7 @@ jobs:
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
10 changes: 9 additions & 1 deletion .github/workflows/e2e-crossplatform.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
name: E2E cross platform

on: [pull_request]
on:
pull_request:
paths:
- packages/desktop/**
- packages/backend/**
- packages/state-manager/**
- packages/identity/**
- packages/common/**

jobs:
mac:
uses: ./.github/workflows/e2e-mac.yml
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
uses: ./.github/actions/setup-env
with:
cachePrefix: "e2e-crossplatform-linux"
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: Run X11
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
uses: ./.github/actions/setup-env
with:
cachePrefix: "e2e-crossplatform-mac"
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
2 changes: 1 addition & 1 deletion .github/workflows/e2e-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
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"
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: "Fetch jsign"
shell: bash
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy Android to Google Play (internal testing)
name: Deploy Android to Google Play

on:
release:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,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: "Unit tests"
run: lerna run test --scope @quiet/state-manager --stream

- name: "desktop-state-manager bracket tests"
run: lerna run rtl-test --scope quiet --stream
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"version": "independent",
"command": {
"version": {
"allowBranch": ["master", "develop", "workflows/require-e2e-before-build-release"],
"allowBranch": ["master", "develop"],
"conventionalCommits": true,
"createRelease": "github"
},
Expand Down
5 changes: 3 additions & 2 deletions packages/backend-bundle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@
"scripts": {},
"keywords": [],
"author": "",
"license": "ISC"
}
"license": "ISC",
"private": true
}
1 change: 1 addition & 0 deletions packages/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"exports": "lib/index.js",
"author": "",
"license": "MIT",
"private": true,
"scripts": {
"build": "tsc -p tsconfig.build.json",
"webpack": "run-script-os",
Expand Down
1 change: 1 addition & 0 deletions packages/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"files": [
"lib/**/*"
],
"private": true,
"scripts": {
"build": "tsc -p tsconfig.build.json",
"prepare": "npm run build",
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.

2 changes: 1 addition & 1 deletion packages/desktop/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "quiet",
"name": "@quiet/desktop",
leblowl marked this conversation as resolved.
Show resolved Hide resolved
"productName": "Quiet",
"author": {
"name": "Zbay LLC",
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop/scripts/setEnvs.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ exports.default = async function (context) {
childProcess.execSync(`${context.artifactPaths[0]} --appimage-extract`)
childProcess.execSync(`mv ./squashfs-root ${context.outDir}/squashfs-root`)
const data = fs.readFileSync(`${context.outDir}/squashfs-root/AppRun`, 'utf8').split('\n')
const index = data.findIndex(text => text === 'BIN="$APPDIR/quiet"')
const index = data.findIndex(text => text === 'BIN="$APPDIR/@quietdesktop"')
if (index !== -1) {
data[index - 1] = 'export LD_PRELOAD="${APPDIR}/usr/lib/libssl.so"'
fs.writeFileSync(`${context.outDir}/squashfs-root/AppRun`, data.join('\n'), 'utf8')
Expand Down
1 change: 1 addition & 0 deletions packages/e2e-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "2.0.1-alpha.1",
"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",
"private": true,
leblowl marked this conversation as resolved.
Show resolved Hide resolved
"scripts": {
"build": "tsc -p tsconfig.build.json",
"prepare": "npm run build",
Expand Down
1 change: 1 addition & 0 deletions packages/eslint-config-custom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "@quiet/eslint-config",
"main": "index.js",
"version": "2.0.1-alpha.1",
"private": true,
"devDependencies": {
"@typescript-eslint/eslint-plugin": "5.59.11",
"@typescript-eslint/parser": "^5.59.11",
Expand Down
1 change: 1 addition & 0 deletions packages/identity/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "Quiet tools for creating certificates and signing messages",
"main": "lib/index.js",
"types": "lib/index.d.js",
"private": true,
"scripts": {
"build": "tsc -p tsconfig.build.json",
"prepare": "npm run build",
Expand Down
1 change: 1 addition & 0 deletions packages/integration-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"main": "lib/index.js",
"author": "",
"license": "ISC",
"private": true,
"scripts": {
"build": "tsc -p tsconfig.build.json",
"prepare": "npm run build",
Expand Down
1 change: 1 addition & 0 deletions packages/logger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"files": [
"lib/**/*"
],
"private": true,
"scripts": {
"build": "tsc -p tsconfig.build.json",
"prepare": "npm run build",
Expand Down
1 change: 1 addition & 0 deletions packages/state-manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "2.0.1-alpha.1",
"description": "",
"main": "lib/index.js",
"private": true,
"scripts": {
"build": "tsc -p tsconfig.build.json",
"prepare": "npm run build",
Expand Down
1 change: 1 addition & 0 deletions packages/types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"files": [
"lib/**/*"
],
"private": true,
"scripts": {
"build": "tsc -p tsconfig.build.json",
"prepare": "npm run build",
Expand Down
Loading