2023-01-03 19:55:46 +00:00
|
|
|
# Copyright 2020 Signal Messenger, LLC
|
2020-10-30 20:34:04 +00:00
|
|
|
# SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
2020-03-18 17:50:20 +00:00
|
|
|
name: CI
|
2021-12-23 18:50:07 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- development
|
2022-04-25 22:53:31 +00:00
|
|
|
- main
|
2021-12-23 18:50:07 +00:00
|
|
|
- '[0-9]+.[0-9]+.x'
|
|
|
|
pull_request:
|
2020-03-18 17:50:20 +00:00
|
|
|
|
|
|
|
jobs:
|
2020-03-20 17:33:55 +00:00
|
|
|
lint:
|
2023-10-04 01:38:58 +00:00
|
|
|
runs-on: ubuntu-latest-8-cores
|
2022-02-25 01:21:56 +00:00
|
|
|
timeout-minutes: 30
|
2020-03-20 17:33:55 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- run: lsb_release -a
|
|
|
|
- run: uname -a
|
2024-06-27 21:48:40 +00:00
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup node.js
|
|
|
|
uses: actions/setup-node@v4
|
2020-03-20 17:33:55 +00:00
|
|
|
with:
|
2024-06-27 21:48:40 +00:00
|
|
|
node-version-file: '.nvmrc'
|
2024-06-24 20:14:32 +00:00
|
|
|
- run: npm install -g npm@10.2.5
|
2021-04-13 22:39:46 +00:00
|
|
|
|
2023-03-29 19:53:27 +00:00
|
|
|
- name: Restore cached .eslintcache and tsconfig.tsbuildinfo
|
2024-06-27 21:48:40 +00:00
|
|
|
uses: actions/cache/restore@v4
|
2023-03-29 19:53:27 +00:00
|
|
|
id: cache-lint
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
.eslintcache
|
|
|
|
tsconfig.tsbuildinfo
|
2024-06-24 20:14:32 +00:00
|
|
|
key: lint-${{ runner.os }}-${{ hashFiles('package.json', 'package-lock.json', 'patches/**', '.eslintrc.js', '.eslint/**', 'tsconfig.json') }}
|
2023-03-29 19:53:27 +00:00
|
|
|
|
2024-06-27 21:48:40 +00:00
|
|
|
- name: Cache Desktop node_modules
|
|
|
|
id: cache-desktop-modules
|
|
|
|
uses: actions/cache@v4
|
|
|
|
with:
|
|
|
|
path: node_modules
|
|
|
|
key: ${{ runner.os }}-${{ hashFiles('package.json', 'package-lock.json', 'patches/**') }}
|
|
|
|
|
2021-04-13 22:39:46 +00:00
|
|
|
- name: Install Desktop node_modules
|
|
|
|
if: steps.cache-desktop-modules.outputs.cache-hit != 'true'
|
2024-06-25 02:59:26 +00:00
|
|
|
run: npm ci
|
2022-11-17 01:38:25 +00:00
|
|
|
env:
|
|
|
|
NPM_CONFIG_LOGLEVEL: verbose
|
2021-04-13 22:39:46 +00:00
|
|
|
|
2024-06-24 20:14:32 +00:00
|
|
|
- run: npm run generate
|
|
|
|
- run: npm run lint
|
|
|
|
- run: npm run lint-deps
|
|
|
|
- run: npm run lint-license-comments
|
2024-03-01 19:33:00 +00:00
|
|
|
|
|
|
|
- name: Check acknowledgments file is up to date
|
2024-06-24 20:14:32 +00:00
|
|
|
run: npm run build:acknowledgments
|
2024-03-01 19:33:00 +00:00
|
|
|
env:
|
|
|
|
REQUIRE_SIGNAL_LIB_FILES: 1
|
|
|
|
|
2020-12-01 16:42:35 +00:00
|
|
|
- run: git diff --exit-code
|
2020-03-20 17:33:55 +00:00
|
|
|
|
2023-03-29 19:53:27 +00:00
|
|
|
- name: Update cached .eslintcache and tsconfig.tsbuildinfo
|
2024-06-27 21:48:40 +00:00
|
|
|
uses: actions/cache/save@v4
|
2023-03-29 19:53:27 +00:00
|
|
|
if: github.ref == 'refs/heads/main'
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
.eslintcache
|
|
|
|
tsconfig.tsbuildinfo
|
2023-03-29 20:15:05 +00:00
|
|
|
key: ${{ steps.cache-lint.outputs.cache-primary-key }}
|
2023-03-29 19:53:27 +00:00
|
|
|
|
2020-03-18 17:50:20 +00:00
|
|
|
macos:
|
2020-03-20 17:33:55 +00:00
|
|
|
needs: lint
|
2022-09-01 16:35:44 +00:00
|
|
|
runs-on: macos-latest
|
2023-03-28 22:33:32 +00:00
|
|
|
if: github.ref == 'refs/heads/main'
|
2022-02-25 01:21:56 +00:00
|
|
|
timeout-minutes: 30
|
2020-03-18 17:50:20 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- run: uname -a
|
2024-06-27 21:48:40 +00:00
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup node.js
|
|
|
|
uses: actions/setup-node@v4
|
2020-03-18 17:50:20 +00:00
|
|
|
with:
|
2024-06-27 21:48:40 +00:00
|
|
|
node-version-file: '.nvmrc'
|
2024-06-24 20:14:32 +00:00
|
|
|
|
|
|
|
- run: npm install -g npm@10.2.5
|
2021-04-13 22:39:46 +00:00
|
|
|
|
|
|
|
- name: Cache Desktop node_modules
|
|
|
|
id: cache-desktop-modules
|
2024-06-27 21:48:40 +00:00
|
|
|
uses: actions/cache@v4
|
2021-04-13 22:39:46 +00:00
|
|
|
with:
|
|
|
|
path: node_modules
|
2024-06-24 20:14:32 +00:00
|
|
|
key: ${{ runner.os }}-${{ hashFiles('package.json', 'package-lock.json', 'patches/**') }}
|
2024-06-27 21:48:40 +00:00
|
|
|
|
2021-04-13 22:39:46 +00:00
|
|
|
- name: Install Desktop node_modules
|
|
|
|
if: steps.cache-desktop-modules.outputs.cache-hit != 'true'
|
2024-06-25 02:59:26 +00:00
|
|
|
run: npm ci
|
2022-11-17 01:38:25 +00:00
|
|
|
env:
|
|
|
|
NPM_CONFIG_LOGLEVEL: verbose
|
2021-04-13 22:39:46 +00:00
|
|
|
|
2024-06-24 20:14:32 +00:00
|
|
|
- run: npm run generate
|
|
|
|
- run: npm run prepare-beta-build
|
|
|
|
- run: npm run test-node
|
|
|
|
- run: npm run test-electron
|
2023-07-20 03:14:08 +00:00
|
|
|
env:
|
|
|
|
ARTIFACTS_DIR: artifacts/macos
|
2022-09-01 18:15:24 +00:00
|
|
|
timeout-minutes: 5
|
2024-01-24 01:31:49 +00:00
|
|
|
- run: touch noop.sh && chmod +x noop.sh
|
2024-06-24 20:14:32 +00:00
|
|
|
- run: npm run build
|
2021-12-17 17:50:42 +00:00
|
|
|
env:
|
|
|
|
DISABLE_INSPECT_FUSE: on
|
2024-01-24 01:31:49 +00:00
|
|
|
SIGN_MACOS_SCRIPT: noop.sh
|
2024-09-09 17:41:32 +00:00
|
|
|
ARTIFACTS_DIR: artifacts/macos
|
2024-08-27 18:44:36 +00:00
|
|
|
- name: Upload installer size
|
|
|
|
if: ${{ github.repository == 'signalapp/Signal-Desktop-Private' && github.ref == 'refs/heads/main' }}
|
|
|
|
run: |
|
|
|
|
node ts/scripts/dd-installer-size.js macos-arm64
|
|
|
|
node ts/scripts/dd-installer-size.js macos-x64
|
|
|
|
node ts/scripts/dd-installer-size.js macos-universal
|
|
|
|
env:
|
|
|
|
DD_API_KEY: ${{ secrets.DATADOG_API_KEY }}
|
2021-12-03 22:49:15 +00:00
|
|
|
- name: Rebuild native modules for x64
|
2024-06-24 20:14:32 +00:00
|
|
|
run: npm run electron:install-app-deps
|
|
|
|
- run: npm run test-release
|
2020-03-18 17:50:20 +00:00
|
|
|
env:
|
|
|
|
NODE_ENV: production
|
2024-06-24 20:14:32 +00:00
|
|
|
- run: npm run test-eslint
|
2020-03-18 17:50:20 +00:00
|
|
|
|
2023-07-20 03:14:08 +00:00
|
|
|
- name: Upload artifacts on failure
|
|
|
|
if: failure()
|
2024-06-27 21:48:40 +00:00
|
|
|
uses: actions/upload-artifact@v4
|
2023-07-20 03:14:08 +00:00
|
|
|
with:
|
|
|
|
path: artifacts
|
|
|
|
|
2020-03-18 17:50:20 +00:00
|
|
|
linux:
|
2020-03-20 17:33:55 +00:00
|
|
|
needs: lint
|
2024-07-22 19:27:09 +00:00
|
|
|
runs-on: ubuntu-latest-8-cores
|
2022-02-25 01:21:56 +00:00
|
|
|
timeout-minutes: 30
|
2020-03-18 17:50:20 +00:00
|
|
|
|
|
|
|
steps:
|
2020-03-20 17:33:55 +00:00
|
|
|
- run: lsb_release -a
|
2020-03-18 17:50:20 +00:00
|
|
|
- run: uname -a
|
2024-06-27 21:48:40 +00:00
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup node.js
|
|
|
|
uses: actions/setup-node@v4
|
2020-03-18 17:50:20 +00:00
|
|
|
with:
|
2024-06-27 21:48:40 +00:00
|
|
|
node-version-file: '.nvmrc'
|
2020-03-18 17:50:20 +00:00
|
|
|
- run: sudo apt-get install xvfb
|
2024-01-24 00:11:12 +00:00
|
|
|
|
2024-06-24 20:14:32 +00:00
|
|
|
- run: npm install -g npm@10.2.5
|
2021-04-13 22:39:46 +00:00
|
|
|
|
|
|
|
- name: Cache Desktop node_modules
|
|
|
|
id: cache-desktop-modules
|
2024-06-27 21:48:40 +00:00
|
|
|
uses: actions/cache@v4
|
2021-04-13 22:39:46 +00:00
|
|
|
with:
|
|
|
|
path: node_modules
|
2024-06-24 20:14:32 +00:00
|
|
|
key: ${{ runner.os }}-${{ hashFiles('package.json', 'package-lock.json', 'patches/**') }}
|
2024-06-27 21:48:40 +00:00
|
|
|
|
2021-04-13 22:39:46 +00:00
|
|
|
- name: Install Desktop node_modules
|
|
|
|
if: steps.cache-desktop-modules.outputs.cache-hit != 'true'
|
2024-06-25 02:59:26 +00:00
|
|
|
run: npm ci
|
2022-11-17 01:38:25 +00:00
|
|
|
env:
|
|
|
|
NPM_CONFIG_LOGLEVEL: verbose
|
2021-04-13 22:39:46 +00:00
|
|
|
|
2024-06-24 20:14:32 +00:00
|
|
|
- run: npm run generate
|
|
|
|
- run: npm run prepare-beta-build
|
2023-03-28 22:33:32 +00:00
|
|
|
|
|
|
|
- name: Create bundle
|
2024-06-24 20:14:32 +00:00
|
|
|
run: npm run build:esbuild:prod
|
2024-09-08 21:09:57 +00:00
|
|
|
- name: Create preload cache
|
|
|
|
run: xvfb-run --auto-servernum npm run build:preload-cache
|
2024-09-09 17:41:32 +00:00
|
|
|
env:
|
|
|
|
ARTIFACTS_DIR: artifacts/linux
|
2023-03-28 22:33:32 +00:00
|
|
|
|
|
|
|
- name: Build with packaging .deb file
|
2024-06-24 20:14:32 +00:00
|
|
|
run: npm run build:release -- --publish=never
|
2023-03-28 22:33:32 +00:00
|
|
|
if: github.ref == 'refs/heads/main'
|
2021-12-17 17:50:42 +00:00
|
|
|
env:
|
|
|
|
DISABLE_INSPECT_FUSE: on
|
2023-03-28 22:33:32 +00:00
|
|
|
- name: Build without packaging .deb file
|
2024-06-24 20:14:32 +00:00
|
|
|
run: npm run build:release -- --linux dir
|
2023-03-28 22:33:32 +00:00
|
|
|
if: github.ref != 'refs/heads/main'
|
|
|
|
env:
|
|
|
|
DISABLE_INSPECT_FUSE: on
|
|
|
|
|
2024-08-27 18:44:36 +00:00
|
|
|
- name: Upload installer size
|
|
|
|
if: ${{ github.repository == 'signalapp/Signal-Desktop-Private' && github.ref == 'refs/heads/main' }}
|
|
|
|
run: node ts/scripts/dd-installer-size.js linux
|
|
|
|
env:
|
|
|
|
DD_API_KEY: ${{ secrets.DATADOG_API_KEY }}
|
|
|
|
|
2024-06-24 20:14:32 +00:00
|
|
|
- run: xvfb-run --auto-servernum npm run test-node
|
2024-09-23 20:56:33 +00:00
|
|
|
|
|
|
|
- name: Clone backup integration tests
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
repository: 'signalapp/Signal-Message-Backup-Tests'
|
2024-10-01 18:42:24 +00:00
|
|
|
ref: '996daf691d4162ce854845dc883c62adb1a3fe55'
|
2024-09-23 20:56:33 +00:00
|
|
|
path: 'backup-integration-tests'
|
|
|
|
|
2024-06-24 20:14:32 +00:00
|
|
|
- run: xvfb-run --auto-servernum npm run test-electron
|
2022-02-25 01:21:56 +00:00
|
|
|
timeout-minutes: 5
|
2020-03-18 17:50:20 +00:00
|
|
|
env:
|
2023-07-20 03:14:08 +00:00
|
|
|
ARTIFACTS_DIR: artifacts/linux
|
2020-03-18 17:50:20 +00:00
|
|
|
LANG: en_US
|
|
|
|
LANGUAGE: en_US
|
2024-09-23 20:56:33 +00:00
|
|
|
BACKUP_INTEGRATION_DIR: 'backup-integration-tests/test-cases'
|
2024-06-24 20:14:32 +00:00
|
|
|
- run: xvfb-run --auto-servernum npm run test-release
|
2020-03-18 17:50:20 +00:00
|
|
|
env:
|
|
|
|
NODE_ENV: production
|
|
|
|
|
2023-07-20 03:14:08 +00:00
|
|
|
- name: Upload artifacts on failure
|
|
|
|
if: failure()
|
2024-06-27 21:48:40 +00:00
|
|
|
uses: actions/upload-artifact@v4
|
2023-07-20 03:14:08 +00:00
|
|
|
with:
|
|
|
|
path: artifacts
|
|
|
|
|
2020-03-18 17:50:20 +00:00
|
|
|
windows:
|
2020-03-20 17:33:55 +00:00
|
|
|
needs: lint
|
2023-08-01 16:06:29 +00:00
|
|
|
runs-on: windows-2019
|
2022-02-25 01:21:56 +00:00
|
|
|
timeout-minutes: 30
|
2020-03-18 17:50:20 +00:00
|
|
|
|
2023-08-01 16:06:29 +00:00
|
|
|
env:
|
|
|
|
BUILD_LOCATION: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Tools\\MSVC\\14.29.30133\\lib\\x86\\store\\references\\"
|
|
|
|
SDK_LOCATION: "C:\\Program Files (x86)\\Windows Kits\\10\\UnionMetadata\\10.0.17134.0"
|
|
|
|
|
2020-03-18 17:50:20 +00:00
|
|
|
steps:
|
|
|
|
- run: systeminfo
|
|
|
|
- run: git config --global core.autocrlf false
|
|
|
|
- run: git config --global core.eol lf
|
2024-06-27 21:48:40 +00:00
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup node.js
|
|
|
|
uses: actions/setup-node@v4
|
2020-03-18 17:50:20 +00:00
|
|
|
with:
|
2024-06-27 21:48:40 +00:00
|
|
|
node-version-file: '.nvmrc'
|
2024-06-24 20:14:32 +00:00
|
|
|
- run: npm install -g npm@10.2.5 node-gyp@10.0.1
|
2023-10-04 01:38:58 +00:00
|
|
|
|
2023-08-01 16:06:29 +00:00
|
|
|
# Set things up so @nodert-win10-rs4 dependencies build properly
|
|
|
|
- run: dir "$env:BUILD_LOCATION"
|
|
|
|
- run: dir "$env:SDK_LOCATION"
|
|
|
|
- run: "copy \"$env:BUILD_LOCATION\\platform.winmd\" \"$env:SDK_LOCATION\""
|
|
|
|
- run: dir "$env:SDK_LOCATION"
|
2021-04-13 22:39:46 +00:00
|
|
|
|
|
|
|
- name: Cache Desktop node_modules
|
|
|
|
id: cache-desktop-modules
|
2024-06-27 21:48:40 +00:00
|
|
|
uses: actions/cache@v4
|
2021-04-13 22:39:46 +00:00
|
|
|
with:
|
|
|
|
path: node_modules
|
2024-06-24 20:14:32 +00:00
|
|
|
key: ${{ runner.os }}-${{ hashFiles('package.json', 'package-lock.json', 'patches/**') }}
|
2024-06-27 21:48:40 +00:00
|
|
|
|
2021-04-13 22:39:46 +00:00
|
|
|
- name: Install Desktop node_modules
|
|
|
|
if: steps.cache-desktop-modules.outputs.cache-hit != 'true'
|
2024-06-25 02:59:26 +00:00
|
|
|
run: npm ci
|
2022-11-17 01:38:25 +00:00
|
|
|
env:
|
2023-10-04 01:38:58 +00:00
|
|
|
CHILD_CONCURRENCY: 1
|
2022-11-17 01:38:25 +00:00
|
|
|
NPM_CONFIG_LOGLEVEL: verbose
|
2021-04-13 22:39:46 +00:00
|
|
|
|
2024-06-24 20:14:32 +00:00
|
|
|
- run: npm run generate
|
|
|
|
- run: npm run test-node
|
2020-03-18 17:50:20 +00:00
|
|
|
- run: copy package.json temp.json
|
|
|
|
- run: del package.json
|
|
|
|
- run: type temp.json | findstr /v certificateSubjectName | findstr /v certificateSha1 > package.json
|
2024-06-24 20:14:32 +00:00
|
|
|
- run: npm run prepare-beta-build
|
2023-03-28 22:33:32 +00:00
|
|
|
|
|
|
|
- name: Create bundle
|
2024-06-24 20:14:32 +00:00
|
|
|
run: npm run build:esbuild:prod
|
2024-09-08 21:09:57 +00:00
|
|
|
- name: Create preload cache
|
|
|
|
run: npm run build:preload-cache
|
2024-09-09 17:41:32 +00:00
|
|
|
env:
|
|
|
|
ARTIFACTS_DIR: artifacts/win
|
2023-03-28 22:33:32 +00:00
|
|
|
|
|
|
|
- name: Build with NSIS
|
2024-06-24 20:14:32 +00:00
|
|
|
run: npm run build:release
|
2023-03-28 22:33:32 +00:00
|
|
|
if: github.ref == 'refs/heads/main'
|
2021-12-17 17:50:42 +00:00
|
|
|
env:
|
|
|
|
DISABLE_INSPECT_FUSE: on
|
2023-03-28 22:33:32 +00:00
|
|
|
- name: Build without NSIS
|
2024-06-24 20:14:32 +00:00
|
|
|
run: npm run build:release -- --win dir
|
2023-03-28 22:33:32 +00:00
|
|
|
if: github.ref != 'refs/heads/main'
|
|
|
|
env:
|
|
|
|
DISABLE_INSPECT_FUSE: on
|
|
|
|
|
2024-08-27 18:44:36 +00:00
|
|
|
- name: Upload installer size
|
|
|
|
if: ${{ github.repository == 'signalapp/Signal-Desktop-Private' && github.ref == 'refs/heads/main' }}
|
|
|
|
run: node ts/scripts/dd-installer-size.js windows
|
|
|
|
env:
|
|
|
|
DD_API_KEY: ${{ secrets.DATADOG_API_KEY }}
|
|
|
|
|
2024-06-24 20:14:32 +00:00
|
|
|
- run: npm run test-electron
|
2023-07-20 03:14:08 +00:00
|
|
|
env:
|
|
|
|
ARTIFACTS_DIR: artifacts/windows
|
2022-02-25 01:21:56 +00:00
|
|
|
timeout-minutes: 5
|
2024-06-24 20:14:32 +00:00
|
|
|
- run: npm run test-release
|
2020-03-18 17:50:20 +00:00
|
|
|
env:
|
|
|
|
SIGNAL_ENV: production
|
2022-01-31 22:01:34 +00:00
|
|
|
|
2023-07-20 03:14:08 +00:00
|
|
|
- name: Upload artifacts on failure
|
|
|
|
if: failure()
|
2024-06-27 21:48:40 +00:00
|
|
|
uses: actions/upload-artifact@v4
|
2023-07-20 03:14:08 +00:00
|
|
|
with:
|
|
|
|
path: artifacts
|
|
|
|
|
2023-12-13 18:34:49 +00:00
|
|
|
sticker-creator:
|
|
|
|
name: Sticker Creator
|
|
|
|
runs-on: ubuntu-latest-8-cores
|
|
|
|
timeout-minutes: 30
|
|
|
|
|
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
working-directory: sticker-creator
|
|
|
|
|
|
|
|
steps:
|
2024-06-27 21:48:40 +00:00
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup node.js
|
|
|
|
uses: actions/setup-node@v4
|
2023-12-13 18:34:49 +00:00
|
|
|
with:
|
2024-06-27 21:48:40 +00:00
|
|
|
node-version-file: '.nvmrc'
|
|
|
|
cache: 'npm'
|
|
|
|
cache-dependency-path: 'package-lock.json'
|
2023-12-13 18:34:49 +00:00
|
|
|
|
|
|
|
- name: Install Sticker Creator node_modules
|
2024-06-25 02:59:26 +00:00
|
|
|
run: npm ci
|
2023-12-13 18:34:49 +00:00
|
|
|
|
|
|
|
- name: Build Sticker Creator
|
2024-06-24 20:14:32 +00:00
|
|
|
run: npm run build
|
2023-12-13 18:34:49 +00:00
|
|
|
|
|
|
|
- name: Check Sticker Creator types
|
2024-06-24 20:14:32 +00:00
|
|
|
run: npm run check:types
|
2023-12-13 18:34:49 +00:00
|
|
|
|
|
|
|
- name: Check Sticker Creator formatting
|
2024-06-24 20:14:32 +00:00
|
|
|
run: npm run prettier:check
|
2023-12-13 18:34:49 +00:00
|
|
|
|
|
|
|
- name: Check Sticker Creator linting
|
2024-06-24 20:14:32 +00:00
|
|
|
run: npm run lint
|
2023-12-13 18:34:49 +00:00
|
|
|
|
|
|
|
- name: Run tests
|
2024-06-24 20:14:32 +00:00
|
|
|
run: npm test -- --run
|
2023-12-13 18:34:49 +00:00
|
|
|
|
2022-04-20 19:35:53 +00:00
|
|
|
mock-tests:
|
2022-01-31 22:01:34 +00:00
|
|
|
needs: lint
|
2023-10-04 01:38:58 +00:00
|
|
|
runs-on: ubuntu-latest-8-cores
|
2022-01-31 22:01:34 +00:00
|
|
|
if: ${{ github.repository == 'signalapp/Signal-Desktop-Private' }}
|
2022-02-25 01:21:56 +00:00
|
|
|
timeout-minutes: 30
|
2022-01-31 22:01:34 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Get system specs
|
|
|
|
run: lsb_release -a
|
|
|
|
- name: Get other system specs
|
|
|
|
run: uname -a
|
|
|
|
|
|
|
|
- name: Clone Desktop repo
|
2024-06-27 21:48:40 +00:00
|
|
|
uses: actions/checkout@v4
|
2022-01-31 22:01:34 +00:00
|
|
|
|
|
|
|
- name: Setup node.js
|
2024-06-27 21:48:40 +00:00
|
|
|
uses: actions/setup-node@v4
|
2022-01-31 22:01:34 +00:00
|
|
|
with:
|
2024-06-27 21:48:40 +00:00
|
|
|
node-version-file: '.nvmrc'
|
2022-01-31 22:01:34 +00:00
|
|
|
- name: Install global dependencies
|
2024-06-24 20:14:32 +00:00
|
|
|
run: npm install -g npm@10.2.5
|
2022-01-31 22:01:34 +00:00
|
|
|
|
|
|
|
- name: Install xvfb
|
|
|
|
run: sudo apt-get install xvfb
|
|
|
|
|
|
|
|
- name: Cache Desktop node_modules
|
|
|
|
id: cache-desktop-modules
|
2024-06-27 21:48:40 +00:00
|
|
|
uses: actions/cache@v4
|
2022-01-31 22:01:34 +00:00
|
|
|
with:
|
|
|
|
path: node_modules
|
2024-06-24 20:14:32 +00:00
|
|
|
key: ${{ runner.os }}-${{ hashFiles('package.json', 'package-lock.json', 'patches/**') }}
|
2022-01-31 22:01:34 +00:00
|
|
|
|
|
|
|
- name: Install Desktop node_modules
|
|
|
|
if: steps.cache-desktop-modules.outputs.cache-hit != 'true'
|
2024-06-25 02:59:26 +00:00
|
|
|
run: npm ci
|
2022-11-17 01:38:25 +00:00
|
|
|
env:
|
|
|
|
NPM_CONFIG_LOGLEVEL: verbose
|
2022-01-31 22:01:34 +00:00
|
|
|
|
|
|
|
- name: Build typescript
|
2024-06-24 20:14:32 +00:00
|
|
|
run: npm run generate
|
2022-01-31 22:01:34 +00:00
|
|
|
- name: Bundle
|
2024-06-24 20:14:32 +00:00
|
|
|
run: npm run build:esbuild:prod
|
2024-09-08 21:09:57 +00:00
|
|
|
- name: Create preload cache
|
|
|
|
run: xvfb-run --auto-servernum npm run build:preload-cache
|
2024-09-09 17:41:32 +00:00
|
|
|
env:
|
|
|
|
ARTIFACTS_DIR: artifacts/linux
|
2022-01-31 22:01:34 +00:00
|
|
|
|
2022-04-20 19:35:53 +00:00
|
|
|
- name: Run mock server tests
|
2022-01-31 22:01:34 +00:00
|
|
|
run: |
|
|
|
|
set -o pipefail
|
2024-06-24 20:14:32 +00:00
|
|
|
xvfb-run --auto-servernum npm run test-mock
|
2022-01-31 22:01:34 +00:00
|
|
|
timeout-minutes: 10
|
|
|
|
env:
|
|
|
|
NODE_ENV: production
|
2022-04-20 19:35:53 +00:00
|
|
|
DEBUG: mock:test:*
|
2022-07-08 20:46:25 +00:00
|
|
|
ARTIFACTS_DIR: artifacts/startup
|
|
|
|
|
|
|
|
- name: Upload mock server test logs on failure
|
|
|
|
if: failure()
|
2024-06-27 21:48:40 +00:00
|
|
|
uses: actions/upload-artifact@v4
|
2022-07-08 20:46:25 +00:00
|
|
|
with:
|
|
|
|
name: logs
|
|
|
|
path: artifacts
|