Testing #131
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
name: Integration test with agoric-sdk | |
on: | |
push: | |
branches: [main] # $default-branch | |
pull_request: | |
jobs: | |
integration-test: | |
runs-on: ubuntu-22.04 # jammy (LTS) | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
path: testnet-load-generator | |
- name: Get the appropriate agoric-sdk branch | |
id: get-sdk-branch | |
uses: actions/github-script@v6 | |
with: | |
result-encoding: string | |
script: | | |
let branch = 'master'; | |
if (context.payload.pull_request) { | |
const { body } = context.payload.pull_request; | |
const regex = /^\#agoric-sdk-branch:\s+(\S+)/m; | |
const result = regex.exec(body); | |
if (result) { | |
branch = result[1]; | |
} | |
} | |
console.log(branch); | |
return branch; | |
- name: Checkout agoric-sdk | |
uses: actions/checkout@v3 | |
with: | |
repository: Agoric/agoric-sdk | |
submodules: 'true' | |
path: agoric-sdk | |
ref: ${{steps.get-sdk-branch.outputs.result}} | |
- name: set GOPATH | |
run: echo GOPATH="$HOME/go" >> $GITHUB_ENV | |
shell: bash | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: '1.20' | |
- name: cache Go modules | |
uses: actions/cache@v3 | |
id: go-cache | |
with: | |
path: ${{ env.GOPATH }}/pkg/mod | |
key: ${{ runner.os }}-${{ runner.arch }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-${{ runner.arch }}-go- | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT | |
- uses: actions/cache@v3 | |
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- name: Start loadgen | |
working-directory: testnet-load-generator | |
env: | |
SDK_SRC: ${{ github.workspace }}/agoric-sdk | |
run: | | |
./start.sh --no-stage.save-storage --no-reset \ | |
--stage.loadgen.faucet.interval=6 --stage.loadgen.faucet.limit=4 \ | |
--stages=3 --stage.duration=10 --stage.loadgen.cycles=4 |