Skip to content

Commit

Permalink
Merge branch 'master' into wallet-keplr
Browse files Browse the repository at this point in the history
  • Loading branch information
samsiegart authored Feb 3, 2022
2 parents 7f5581f + f96b728 commit ce56090
Show file tree
Hide file tree
Showing 122 changed files with 7,196 additions and 2,860 deletions.
131 changes: 65 additions & 66 deletions .github/workflow-templates/test-dapp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name: Test Dapp

on:
push:
branches: [ $default-branch ]
branches: [$default-branch]
pull_request:

jobs:
Expand All @@ -16,74 +16,73 @@ jobs:
node-version: ['14.x']

steps:
- name: Checkout agoric-sdk
uses: actions/checkout@v2
with:
path: agoric-sdk
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
cache-dependency-path: agoric-sdk/yarn.lock
- name: cache node modules
uses: actions/cache@v1
with:
path: ~/.cache/yarn
key: ${{ runner.os }}-yarn-${{ hashFiles('agoric-sdk/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Checkout agoric-sdk
uses: actions/checkout@v2
with:
path: agoric-sdk
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
cache-dependency-path: agoric-sdk/yarn.lock
- name: cache node modules
uses: actions/cache@v1
with:
path: ~/.cache/yarn
key: ${{ runner.os }}-yarn-${{ hashFiles('agoric-sdk/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
# Select a branch on dapp to test against by adding text to the body of the
# pull request. For example: #dapp-encouragement-branch: zoe-release-0.7.0
# The default is 'main'
- name: Get the appropriate dapp branch
id: get-branch
uses: actions/[email protected]
with:
result-encoding: string
script: |
let branch = 'main';
if (context.payload.pull_request) {
const { body } = context.payload.pull_request;
const regex = /.*\#[[INSERT_DAPP_NAME]]-branch:\s+(\S+)/;
const result = regex.exec(body);
if (result) {
branch = result[1];
# Select a branch on dapp to test against by adding text to the body of the
# pull request. For example: #dapp-encouragement-branch: zoe-release-0.7.0
# The default is 'main'
- name: Get the appropriate dapp branch
id: get-branch
uses: actions/[email protected]
with:
result-encoding: string
script: |
let branch = 'main';
if (context.payload.pull_request) {
const { body } = context.payload.pull_request;
const regex = /.*\#[[INSERT_DAPP_NAME]]-branch:\s+(\S+)/;
const result = regex.exec(body);
if (result) {
branch = result[1];
}
}
}
console.log(branch);
return branch;
console.log(branch);
return branch;
- name: yarn install --frozen-lockfile
run: yarn install --frozen-lockfile
working-directory: ./agoric-sdk
# 'yarn build' loops over all workspaces
- name: yarn build
run: yarn build
working-directory: ./agoric-sdk
- name: yarn link
run: |
yarn link-cli ~/bin/agoric
echo "/home/runner/bin" >> $GITHUB_PATH
working-directory: ./agoric-sdk

- name: yarn install --frozen-lockfile
run: yarn install --frozen-lockfile
working-directory: ./agoric-sdk
# 'yarn build' loops over all workspaces
- name: yarn build
run: yarn build
working-directory: ./agoric-sdk
- name: yarn link
run: |
yarn link-cli ~/bin/agoric
echo "/home/runner/bin" >> $GITHUB_PATH
working-directory: ./agoric-sdk
- name: Check out dapp
uses: actions/checkout@v2
with:
repository: Agoric/[[INSERT_DAPP_NAME]]
path: dapp
ref: ${{steps.get-branch.outputs.result}}

- name: Check out dapp
uses: actions/checkout@v2
with:
repository: Agoric/[[INSERT_DAPP_NAME]]
path: dapp
ref: ${{steps.get-branch.outputs.result}}
- name: Agoric install in dapp
run: agoric install
working-directory: ./dapp

- name: Agoric install in dapp
run: agoric install
working-directory: ./dapp
- name: yarn build in dapp
run: yarn build
working-directory: ./dapp

- name: yarn build in dapp
run: yarn build
working-directory: ./dapp

- name: yarn test in dapp
run: yarn test
working-directory: ./dapp
- name: yarn test in dapp
run: yarn test
working-directory: ./dapp
84 changes: 42 additions & 42 deletions .github/workflows/deployment-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,53 +6,53 @@ on:
workflow_dispatch:
# Otherwise, run on default branch.
push:
branches: [ master ] # $default-branch
branches: [master] # $default-branch

jobs:
deployment-test:
runs-on: ubuntu-18.04 # trusty
steps:
- uses: actions/checkout@v2
with:
clean: 'false'
- uses: ./.github/actions/restore-golang
with:
go-version: 1.17
- uses: ./.github/actions/restore-node
with:
node-version: 14.x
- name: Build cosmic-swingset dependencies
run: |
# Some of our build relies on /usr/src/agoric-sdk
set -e
sudo mv "$GITHUB_WORKSPACE" /usr/src/agoric-sdk
ln -s /usr/src/agoric-sdk "$GITHUB_WORKSPACE"
cd /usr/src/agoric-sdk/packages/cosmic-swingset
make install
working-directory: /
- run: sudo ./packages/deployment/scripts/install-deps.sh
working-directory: /usr/src/agoric-sdk
- run: /usr/src/agoric-sdk/packages/deployment/scripts/integration-test.sh
env:
NETWORK_NAME: chaintest
- name: capture results
if: failure()
run: |
NOW=$(date -u +%Y%m%dT%H%M%S)
echo "NOW=$NOW" >> "$GITHUB_ENV"
- uses: actions/checkout@v2
with:
clean: 'false'
- uses: ./.github/actions/restore-golang
with:
go-version: 1.17
- uses: ./.github/actions/restore-node
with:
node-version: 14.x
- name: Build cosmic-swingset dependencies
run: |
# Some of our build relies on /usr/src/agoric-sdk
set -e
sudo mv "$GITHUB_WORKSPACE" /usr/src/agoric-sdk
ln -s /usr/src/agoric-sdk "$GITHUB_WORKSPACE"
cd /usr/src/agoric-sdk/packages/cosmic-swingset
make install
working-directory: /
- run: sudo ./packages/deployment/scripts/install-deps.sh
working-directory: /usr/src/agoric-sdk
- run: /usr/src/agoric-sdk/packages/deployment/scripts/integration-test.sh
env:
NETWORK_NAME: chaintest
- name: capture results
if: failure()
run: |
NOW=$(date -u +%Y%m%dT%H%M%S)
echo "NOW=$NOW" >> "$GITHUB_ENV"
# Stop the chain from running.
/usr/src/agoric-sdk/packages/deployment/scripts/setup.sh play stop || true
# Stop the chain from running.
/usr/src/agoric-sdk/packages/deployment/scripts/setup.sh play stop || true
# Get the results.
/usr/src/agoric-sdk/packages/deployment/scripts/capture-integration-results.sh
# Get the results.
/usr/src/agoric-sdk/packages/deployment/scripts/capture-integration-results.sh
# Tear down the nodes.
echo yes | /usr/src/agoric-sdk/packages/deployment/scripts/setup.sh destroy
env:
NETWORK_NAME: chaintest
- uses: actions/upload-artifact@v2
if: failure()
with:
name: deployment-test-results-${{ env.NOW }}
path: chaintest/results
# Tear down the nodes.
echo yes | /usr/src/agoric-sdk/packages/deployment/scripts/setup.sh destroy
env:
NETWORK_NAME: chaintest
- uses: actions/upload-artifact@v2
if: failure()
with:
name: deployment-test-results-${{ env.NOW }}
path: chaintest/results
Loading

0 comments on commit ce56090

Please sign in to comment.