From 8292767f1cd1c98aa2ddf8d5fad80bef6fd8986b Mon Sep 17 00:00:00 2001 From: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com> Date: Mon, 23 Sep 2024 13:56:33 -0700 Subject: [PATCH] Run backup integration tests in CI --- .github/workflows/ci.yml | 9 +++++++++ ts/test-electron/backup/integration_test.ts | 6 ++++++ 2 files changed, 15 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d6da27fdc..b0ae0d4e9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -189,12 +189,21 @@ jobs: DD_API_KEY: ${{ secrets.DATADOG_API_KEY }} - run: xvfb-run --auto-servernum npm run test-node + + - name: Clone backup integration tests + uses: actions/checkout@v4 + with: + repository: 'signalapp/Signal-Message-Backup-Tests' + ref: 'a18c9146e07441827a9b7c2e54ec0a5e6f2aa5bd' + path: 'backup-integration-tests' + - run: xvfb-run --auto-servernum npm run test-electron timeout-minutes: 5 env: ARTIFACTS_DIR: artifacts/linux LANG: en_US LANGUAGE: en_US + BACKUP_INTEGRATION_DIR: 'backup-integration-tests/test-cases' - run: xvfb-run --auto-servernum npm run test-release env: NODE_ENV: production diff --git a/ts/test-electron/backup/integration_test.ts b/ts/test-electron/backup/integration_test.ts index db696a093..58e6bfaa0 100644 --- a/ts/test-electron/backup/integration_test.ts +++ b/ts/test-electron/backup/integration_test.ts @@ -56,6 +56,12 @@ describe('backup/integration', () => { .filter(file => file.endsWith('.binproto')) .map(file => join(BACKUP_INTEGRATION_DIR, file)); + if (files.length === 0) { + it('no backup tests', () => { + throw new Error('No backup integration tests'); + }); + } + for (const fullPath of files) { it(basename(fullPath), async () => { const expectedBuffer = await readFile(fullPath);