Skip to content

Commit

Permalink
ci(SwingSet): only test golden snapshot hashes with pinned Endo
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfig authored and mhofman committed Aug 7, 2023
1 parent 50e4a3b commit 5315d08
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/test-all-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down Expand Up @@ -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())
Expand Down Expand Up @@ -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())
Expand Down Expand Up @@ -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)
Expand Down
8 changes: 8 additions & 0 deletions packages/SwingSet/test/test-xsnap-store.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* global globalThis */
import '@endo/init/debug.js';

import { spawn } from 'child_process';
Expand Down Expand Up @@ -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());

Expand Down

0 comments on commit 5315d08

Please sign in to comment.