Skip to content

refactor: move atomicRearrange into Zcf #25751

refactor: move atomicRearrange into Zcf

refactor: move atomicRearrange into Zcf #25751

Workflow file for this run

name: Integration tests
on:
workflow_dispatch:
push:
branches:
- master
- release-pismo
- beta
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
- labeled
- auto_merge_enabled
merge_group:
jobs:
pre_check:
uses: ./.github/workflows/pre-check-integration.yml
# This job is meant to emulate what developers working with the Agoric platform will experience
# It should be kept in sync with https://agoric.com/documentation/getting-started/
getting-started:
needs: pre_check
if: needs.pre_check.outputs.should_run == 'true'
runs-on: ubuntu-latest
strategy:
matrix:
cli: [link-cli, local-npm]
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
- name: Reconfigure git to use HTTP authentication
run: git config --global url."https://github.com/".insteadOf ssh://[email protected]/
shell: bash
# Prerequisites
- uses: actions/setup-node@v3
with:
node-version: '16.x'
- name: cache node modules
uses: actions/cache@v3
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@v6
with:
result-encoding: string
script: |
let branch = 'main';
if (context.payload.pull_request) {
const { body } = context.payload.pull_request;
const regex = /^\#getting-started-branch:\s+(\S+)/m;
const result = regex.exec(body);
if (result) {
branch = result[1];
}
}
console.log(branch);
return branch;
# 'yarn install' must be done at the top level, to build all the
# cross-package symlinks
- run: yarn install --frozen-lockfile
- run: yarn build
- name: Link Agoric CLI from SDK
if: ${{ matrix.cli == 'link-cli' }}
run: |
yarn link-cli "$HOME/bin/agoric"
echo "AGORIC_CMD=[\"$HOME/bin/agoric\"]" >> $GITHUB_ENV
- name: Start local NPM registry
if: ${{ matrix.cli == 'local-npm' }}
run: |
tmp_registry_log=`mktemp`
dist_tag=agblah
nohup npx verdaccio@^5.4.0 &>$tmp_registry_log &
# Wait for `verdaccio` to boot
grep -q 'http address' <(tail -f $tmp_registry_log)
# Set registry to local registry
npm set registry http://localhost:4873
yarn config set registry http://localhost:4873
# Login so we can publish packages
npx npm-cli-login@^1.0.0 -u user -p password -e [email protected] \
-r http://localhost:4873 --quotes
npm whoami
# Publish the packages to our local service.
# without concurrency until https://github.com/Agoric/agoric-sdk/issues/8091
yarn lerna publish --concurrency 1 --conventional-prerelease --canary --exact \
--dist-tag=$dist_tag --preid=dev-$(git rev-parse --short=7 HEAD) \
--no-push --no-verify-access --yes
# Git dirty check.
if [[ -n "$(git status --porcelain)" ]]; then
echo "Git status is dirty, aborting."
git status
exit 1
fi
# Install the Agoric CLI on this machine's $PATH.
yarn global add agoric@$dist_tag </dev/null
# Use the locally-installed dist-tag.
echo "AGORIC_INSTALL_OPTIONS=[\"$dist_tag\"]" >> $GITHUB_ENV
echo 'AGORIC_START_OPTIONS=["--rebuild"]' >> $GITHUB_ENV
echo 'AGORIC_CMD=["agoric"]' >> $GITHUB_ENV
- name: run agoric-cli integration-test
working-directory: ./packages/agoric-cli
run: yarn integration-test
env:
AGORIC_INIT_OPTIONS: '["--dapp-branch=${{steps.get-branch.outputs.result}}"]'
# Try to avoid hitting a pessimal Actions output rate-limitation.
SOLO_MAX_DEBUG_LENGTH: '1024'
- name: notify on failure
if: >
failure() && github.event_name != 'pull_request' &&
github.repository_owner == 'agoric'
uses: ./.github/actions/notify-status
with:
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
from: ${{ secrets.NOTIFY_EMAIL_FROM }}
to: ${{ secrets.NOTIFY_EMAIL_TO }}
password: ${{ secrets.NOTIFY_EMAIL_PASSWORD }}