Skip to content

[Snyk] Security upgrade @agoric/cosmic-swingset from 0.19.0 to 0.34.6 #318

[Snyk] Security upgrade @agoric/cosmic-swingset from 0.19.0 to 0.34.6

[Snyk] Security upgrade @agoric/cosmic-swingset from 0.19.0 to 0.34.6 #318

name: Test Dapp Autoswap
# run CI on pushes to master, and on all PRs (even the ones that target other
# branches)
on:
push:
branches: [ $default-branch ]
pull_request:
jobs:
test-dapp:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['14.x']
steps:
- name: Checkout agoric-sdk
uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: cache node modules
uses: actions/cache@v1
with:
path: ~/.cache/yarn
key: ${{ runner.os }}-yarn-${{ hashFiles('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/github-script@0.9.0
with:
result-encoding: string
script: |
let branch = 'main';
if (context.payload.pull_request) {
const { body } = context.payload.pull_request;
const regex = /.*\#dapp-autoswap-branch:\s+(\S+)/;
const result = regex.exec(body);
if (result) {
branch = result[1];
}
}
console.log(branch);
return branch;
- name: yarn install
run: yarn install
# 'yarn build' loops over all workspaces
- name: yarn build
run: yarn build
- name: yarn link
run: |
yarn link-cli ~/bin/agoric
echo "::add-path::/home/runner/bin"
- name: Check out dapp
uses: actions/checkout@v2
with:
repository: Agoric/dapp-autoswap
path: dapp
ref: ${{steps.get-branch.outputs.result}}
- name: Agoric install in dapp
run: agoric install
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