-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Adds simple way to start supersim in unit tests * Adds @types/node as a dev dep to make autocomplete work in unit tests * Removes the static l2 genesis file we've been using for our unit tests now that we have supersim * Adds basic shell for supersim action * Removes setupInterop since its no longer needed with supersim
- Loading branch information
Showing
15 changed files
with
326 additions
and
171 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
name: Supersim | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Install Supersim | ||
uses: jaxxstorm/[email protected] | ||
with: | ||
repo: ethereum-optimism/supersim | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { spawn } from 'child_process' | ||
|
||
export type SupersimParameters = { | ||
l1Port?: number | ||
l2StartingPort?: number | ||
} | ||
|
||
export type SupersimReturnArg = Promise<() => void> | ||
|
||
export async function startSupersim( | ||
params?: SupersimParameters, | ||
): SupersimReturnArg { | ||
const args = [] as string[] | ||
|
||
if (params?.l1Port) { | ||
args.push(`--l1.port ${params.l1Port}`) | ||
} | ||
|
||
if (params?.l2StartingPort) { | ||
args.push(` --l2.starting.port ${params.l2StartingPort}`) | ||
} | ||
|
||
const supersimProcess = spawn('supersim', args, { shell: true }) | ||
|
||
return () => { | ||
if (!supersimProcess.killed) { | ||
supersimProcess.kill() | ||
} | ||
} | ||
} |
Oops, something went wrong.