From 5315d084c67e29eca74d538b2c7654ecc803e3b8 Mon Sep 17 00:00:00 2001 From: Michael FIG Date: Tue, 20 Jun 2023 11:28:33 -0600 Subject: [PATCH] ci(SwingSet): only test golden snapshot hashes with pinned Endo --- .github/workflows/test-all-packages.yml | 8 ++++++++ packages/SwingSet/test/test-xsnap-store.js | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/.github/workflows/test-all-packages.yml b/.github/workflows/test-all-packages.yml index cbc6182f323..26a9d5c4cc1 100644 --- a/.github/workflows/test-all-packages.yml +++ b/.github/workflows/test-all-packages.yml @@ -464,6 +464,8 @@ jobs: - uses: ./.github/actions/restore-node with: node-version: ${{ steps.vars.outputs.node-version }} + id: restore-node + - run: echo "ENDO_BRANCH=${{ steps.restore-node.outputs.endo-branch }}" >> $GITHUB_ENV # END-TEST-BOILERPLATE - name: yarn test (SwingSet) if: (success() || failure()) @@ -504,6 +506,8 @@ jobs: - uses: ./.github/actions/restore-node with: node-version: ${{ steps.vars.outputs.node-version }} + id: restore-node + - run: echo "ENDO_BRANCH=${{ steps.restore-node.outputs.endo-branch }}" >> $GITHUB_ENV # END-TEST-BOILERPLATE - name: yarn test (SwingSet) if: (success() || failure()) @@ -553,6 +557,8 @@ jobs: - uses: ./.github/actions/restore-node with: node-version: ${{ steps.vars.outputs.node-version }} + id: restore-node + - run: echo "ENDO_BRANCH=${{ steps.restore-node.outputs.endo-branch }}" >> $GITHUB_ENV # END-TEST-BOILERPLATE - name: yarn test (SwingSet) if: (success() || failure()) @@ -592,6 +598,8 @@ jobs: - uses: ./.github/actions/restore-node with: node-version: ${{ steps.vars.outputs.node-version }} + id: restore-node + - run: echo "ENDO_BRANCH=${{ steps.restore-node.outputs.endo-branch }}" >> $GITHUB_ENV # END-TEST-BOILERPLATE - name: yarn test (SwingSet) diff --git a/packages/SwingSet/test/test-xsnap-store.js b/packages/SwingSet/test/test-xsnap-store.js index 83b5f51f2ee..3c015ab89d4 100644 --- a/packages/SwingSet/test/test-xsnap-store.js +++ b/packages/SwingSet/test/test-xsnap-store.js @@ -1,3 +1,4 @@ +/* global globalThis */ import '@endo/init/debug.js'; import { spawn } from 'child_process'; @@ -130,6 +131,13 @@ test('create SES worker, save, restore, resume', async t => { * They are also sensitive to the XS code itself. */ test('XS + SES snapshots are long-term deterministic', async t => { + const ENDO_BRANCH = globalThis.process?.env?.ENDO_BRANCH; + if (ENDO_BRANCH && ENDO_BRANCH !== 'NOPE') { + t.log(`Skipping test on ENDO_BRANCH=${ENDO_BRANCH}`); + t.pass(); + return; + } + const db = sqlite3(':memory:'); const store = makeSnapStore(db, () => {}, makeMockSnapStoreIO());