From a28af7e68c0f5d559d790a44580d8b621327a90b Mon Sep 17 00:00:00 2001 From: Vladimir Voronkov Date: Fri, 23 Feb 2024 09:31:21 +0200 Subject: [PATCH 1/4] Fix disabling auto-update when build release --- scripts/build-release.sh | 8 ++++---- scripts/setup.sh | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/build-release.sh b/scripts/build-release.sh index 3862083b..27f93e1d 100755 --- a/scripts/build-release.sh +++ b/scripts/build-release.sh @@ -152,12 +152,12 @@ fi if [ $isAutoUpdateDisabled == 1 ]; then echo -e "\n${COLOR_YELLOW}Auto-update is turned off!${COLOR_NORMAL}" - sed -i -e \ - "s/\"IS_AUTO_UPDATE_DISABLED\": .*/\"IS_AUTO_UPDATE_DISABLED\": true/g" \ + sed -i -E -e \ + "s/\"IS_AUTO_UPDATE_DISABLED\": (false)|(true)/\"IS_AUTO_UPDATE_DISABLED\": true/g" \ "$ROOT/$ELECTRON_ENV_FILE_NAME" else - sed -i -e \ - "s/\"IS_AUTO_UPDATE_DISABLED\": .*/\"IS_AUTO_UPDATE_DISABLED\": false/g" \ + sed -i -E -e \ + "s/\"IS_AUTO_UPDATE_DISABLED\": (false)|(true)/\"IS_AUTO_UPDATE_DISABLED\": false/g" \ "$ROOT/$ELECTRON_ENV_FILE_NAME" fi diff --git a/scripts/setup.sh b/scripts/setup.sh index f8c77105..62f1f3a8 100755 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -94,12 +94,12 @@ fi if [ $isAutoUpdateDisabled == 1 ]; then echo -e "\n${COLOR_YELLOW}Auto-update is turned off!${COLOR_NORMAL}" - sed -i -e \ - "s/\"IS_AUTO_UPDATE_DISABLED\": .*/\"IS_AUTO_UPDATE_DISABLED\": true/g" \ + sed -i -E -e \ + "s/\"IS_AUTO_UPDATE_DISABLED\": (false)|(true)/\"IS_AUTO_UPDATE_DISABLED\": true/g" \ "$ROOT/$ELECTRON_ENV_FILE_NAME" else - sed -i -e \ - "s/\"IS_AUTO_UPDATE_DISABLED\": .*/\"IS_AUTO_UPDATE_DISABLED\": false/g" \ + sed -i -E -e \ + "s/\"IS_AUTO_UPDATE_DISABLED\": (false)|(true)/\"IS_AUTO_UPDATE_DISABLED\": false/g" \ "$ROOT/$ELECTRON_ENV_FILE_NAME" fi From c2bd9c8d058b12bd001b08455bdf2d02672fd8fb Mon Sep 17 00:00:00 2001 From: Vladimir Voronkov Date: Fri, 23 Feb 2024 09:31:50 +0200 Subject: [PATCH 2/4] Update gh actions to resolve deprecation warnings --- .github/workflows/build-electron-app.yml | 34 ++++++++++++------------ .github/workflows/ci.yml | 4 +-- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.github/workflows/build-electron-app.yml b/.github/workflows/build-electron-app.yml index fe669ff9..b076422c 100644 --- a/.github/workflows/build-electron-app.yml +++ b/.github/workflows/build-electron-app.yml @@ -52,7 +52,7 @@ jobs: echo "IS_BFX_API_STAGING=1" >> $GITHUB_ENV - name: Cache Electron binaries id: electron-cache - uses: actions/cache@v3 + uses: actions/cache@v4 env: cache-name: electron-cache-v1 with: @@ -64,7 +64,7 @@ jobs: ${{ runner.os }}-build-${{ env.cache-name }}- - name: Build release id: release-builder - uses: nick-fields/retry@v2 + uses: nick-fields/retry@v3 continue-on-error: false env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -78,14 +78,14 @@ jobs: - name: Zip Linux Unpacked build run: zip -r dist/linux-unpacked.zip dist/linux-unpacked - name: Upload Linux Unpacked build - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: linux-unpacked path: dist/linux-unpacked.zip - name: Zip Win Unpacked build run: zip -r dist/win-unpacked.zip dist/win-unpacked - name: Upload Win Unpacked build - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: win-unpacked path: dist/win-unpacked.zip @@ -124,12 +124,12 @@ jobs: name: Use BFX API Staging for queries run: | echo "IS_BFX_API_STAGING=1" >> $GITHUB_ENV - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: node-version: 18.17.1 - name: Cache Electron binaries id: electron-cache - uses: actions/cache@v3 + uses: actions/cache@v4 env: cache-name: electron-cache-v1 with: @@ -140,7 +140,7 @@ jobs: ${{ runner.os }}-build-${{ env.cache-name }}- - name: Build release id: release-builder - uses: nick-fields/retry@v2 + uses: nick-fields/retry@v3 continue-on-error: false env: APPLE_TEAM_ID: ${{ secrets.BFX_APPLE_TEAM_ID }} @@ -167,7 +167,7 @@ jobs: - name: Zip Mac Unpacked build run: zip -r dist/mac.zip dist/mac - name: Upload Mac Unpacked build - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: mac-unpacked path: dist/mac.zip @@ -180,13 +180,13 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: node-version: 18.17.1 - name: Install main dev deps run: npm i --development --no-audit --progress=false --force - name: Download Linux Unpacked build - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: linux-unpacked path: dist @@ -199,7 +199,7 @@ jobs: - name: Normalize E2E test report run: node ./scripts/node/normalize-e2e-test-report e2e-test-report.xml - name: Upload Linux E2E test results - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: linux-e2e-test-results path: e2e-test-report.xml @@ -212,13 +212,13 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: node-version: 18.17.1 - name: Install main dev deps run: npm i --development --no-audit --progress=false --force - name: Download Linux Unpacked build - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: win-unpacked path: dist @@ -231,7 +231,7 @@ jobs: - name: Normalize E2E test report run: node ./scripts/node/normalize-e2e-test-report e2e-test-report.xml - name: Upload Win E2E test results - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: win-e2e-test-results path: e2e-test-report.xml @@ -246,13 +246,13 @@ jobs: uses: actions/checkout@v4 - name: Prepare Mac runner uses: ./.github/actions/prepare-mac-runner - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: node-version: 18.17.1 - name: Install main dev deps run: npm i --development --no-audit --progress=false --force - name: Download Mac Unpacked build - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: mac-unpacked path: dist @@ -265,7 +265,7 @@ jobs: - name: Normalize E2E test report run: node ./scripts/node/normalize-e2e-test-report e2e-test-report.xml - name: Upload Mac E2E test results - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: mac-e2e-test-results path: e2e-test-report.xml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c4154b2e..1941df0c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,14 +18,14 @@ jobs: uses: actions/checkout@v4 with: submodules: recursive - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: node-version: 18.17.1 - name: Setup configs and install deps run: ./scripts/setup.sh -u - name: Run tests run: npm test -- -- --reporter=json --reporter-option output=test-report.json - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: success() || failure() with: name: test-results From a6e0eb0e90b0b98423ad1b9fa048e23a12da0fea Mon Sep 17 00:00:00 2001 From: Vladimir Voronkov Date: Fri, 23 Feb 2024 10:56:59 +0200 Subject: [PATCH 3/4] Point coactions/setup-xvfb gh action to exect commit to have last nodejs under hood --- .github/workflows/build-electron-app.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-electron-app.yml b/.github/workflows/build-electron-app.yml index b076422c..c92f5deb 100644 --- a/.github/workflows/build-electron-app.yml +++ b/.github/workflows/build-electron-app.yml @@ -193,7 +193,7 @@ jobs: - name: Unzip Linux Unpacked build run: unzip dist/linux-unpacked.zip - name: Run tests - uses: coactions/setup-xvfb@v1.0.1 + uses: coactions/setup-xvfb@6b00cf1889f4e1d5a48635647013c0508128ee1a with: run: npm run e2e - name: Normalize E2E test report @@ -225,7 +225,7 @@ jobs: - name: Unzip Win Unpacked build run: 7z -y x dist/win-unpacked.zip - name: Run tests - uses: coactions/setup-xvfb@v1.0.1 + uses: coactions/setup-xvfb@6b00cf1889f4e1d5a48635647013c0508128ee1a with: run: npm run e2e - name: Normalize E2E test report @@ -259,7 +259,7 @@ jobs: - name: Unzip Mac Unpacked build run: unzip dist/mac.zip - name: Run tests - uses: coactions/setup-xvfb@v1.0.1 + uses: coactions/setup-xvfb@6b00cf1889f4e1d5a48635647013c0508128ee1a with: run: npm run e2e - name: Normalize E2E test report From cb600d06ec89348f73f9fbc7e10bbc9ae5828793 Mon Sep 17 00:00:00 2001 From: Vladimir Voronkov Date: Fri, 23 Feb 2024 10:59:56 +0200 Subject: [PATCH 4/4] Use actions/upload-artifact v3 for uploading test results to fix incompatibility with dorny/test-reporter@v1 https://github.com/dorny/test-reporter/issues/363 --- .github/workflows/build-electron-app.yml | 6 +++--- .github/workflows/ci.yml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-electron-app.yml b/.github/workflows/build-electron-app.yml index c92f5deb..52a58eb8 100644 --- a/.github/workflows/build-electron-app.yml +++ b/.github/workflows/build-electron-app.yml @@ -199,7 +199,7 @@ jobs: - name: Normalize E2E test report run: node ./scripts/node/normalize-e2e-test-report e2e-test-report.xml - name: Upload Linux E2E test results - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v3 with: name: linux-e2e-test-results path: e2e-test-report.xml @@ -231,7 +231,7 @@ jobs: - name: Normalize E2E test report run: node ./scripts/node/normalize-e2e-test-report e2e-test-report.xml - name: Upload Win E2E test results - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v3 with: name: win-e2e-test-results path: e2e-test-report.xml @@ -265,7 +265,7 @@ jobs: - name: Normalize E2E test report run: node ./scripts/node/normalize-e2e-test-report e2e-test-report.xml - name: Upload Mac E2E test results - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v3 with: name: mac-e2e-test-results path: e2e-test-report.xml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1941df0c..acf4b350 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,7 +25,7 @@ jobs: run: ./scripts/setup.sh -u - name: Run tests run: npm test -- -- --reporter=json --reporter-option output=test-report.json - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v3 if: success() || failure() with: name: test-results