Skip to content

Commit

Permalink
Merge pull request #20 from Agoric/ta/skip-use
Browse files Browse the repository at this point in the history
  • Loading branch information
turadg authored Nov 9, 2023
2 parents b63b9a5 + c3997cb commit 4b36656
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 36 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

# The .ts scripts depend upon this
- run: yarn global add tsx
- run: npm install --global tsx

- name: build test images
run: |
Expand Down
29 changes: 27 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Proposals run or planned for Mainnet (agoric-3)
This repo serves several functions:

- verify building an image with in which known proposals have executed
- publishing an image with all passed proposals (TODO: https://github.com/Agoric/agoric-3-proposals/issues/6)
- publishing an image with all passed proposals
- verify that certain tests pass after each proposal

# Design
Expand Down Expand Up @@ -52,6 +52,8 @@ If the proposal is _pending_ and does not yet have a number, use a letter. The p

# Usage

## Development

To build the test images,

```
Expand All @@ -72,7 +74,30 @@ To run the tests for particular proposals,
./runTestImages.ts --match upgrade
```

To add a proposal, see [./CONTRIBUTING.md]
## Contributing

To add a proposal, see [CONTRIBUTING.md](./CONTRIBUTING.md).

## Images

This repo publishes an image of the synthetic agoric-3 chain with all proposals that have "passed" (defined in this repo as having a proposal number).

The CI builds on every push to the trunk branch, (`main`), or a PR branch. You can view all versions at https://github.com/agoric/agoric-3-proposals/pkgs/container/agoric-3-proposals/versions

The versions built from the main branch are at: `ghcr.io/agoric/agoric-3-proposals:main`. For each PR, they're at a URL like `ghcr.io/agoric/agoric-3-proposals:pr-11`.

If you RUN this image, you'll get a working chain running `agd` until you terminate,

```sh
docker run ghcr.io/agoric/agoric-3-proposals:main
```

Or locally,

```
docker build -t ghrc.io/agoric/agoric-3-proposals:dev .
docker run ghrc.io/agoric/agoric-3-proposals:dev
```

## Future work

Expand Down
8 changes: 0 additions & 8 deletions proposals/49:smart-wallet-nft/eval.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,5 @@ source /usr/src/upgrade-test-scripts/env_setup.sh

ls -al

yarn install --immutable

# XXX to avoid rebuilding lower layers
# TODO clean up JS lib code so it's more independent
cp package.json yarn.lock /usr/src/upgrade-test-scripts/lib/
cd /usr/src/upgrade-test-scripts/lib/ && yarn install --immutable
cd -

# XXX using Ava serial to script the core-eval
yarn ava upgrade-wf.test.js
8 changes: 0 additions & 8 deletions proposals/49:smart-wallet-nft/use.sh

This file was deleted.

6 changes: 0 additions & 6 deletions proposals/55:statom-vaults/eval.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,5 @@ source /usr/src/upgrade-test-scripts/env_setup.sh

ls -al

# XXX to avoid rebuilding lower layers
# TODO clean up JS lib code so it's more independent
cp package.json yarn.lock /usr/src/upgrade-test-scripts/lib/
cd /usr/src/upgrade-test-scripts/lib/ && yarn install --immutable
cd -

# XXX using Ava serial to script the core-eval
yarn ava add-collateral.test.js
8 changes: 0 additions & 8 deletions proposals/55:statom-vaults/use.sh

This file was deleted.

22 changes: 19 additions & 3 deletions upgrade-test-scripts/run_use.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,32 @@

set -e

ID=$1
if [ -z "$ID" ]; then
echo "Must specify what proposal to use"
exit 1
fi
PROPOSAL_PATH="/usr/src/proposals/$ID/"

if [ ! -d "$PROPOSAL_PATH" ]; then
echo "Proposal $ID does not exist"
exit 1
fi

if [ ! -f "$PROPOSAL_PATH/use.sh" ]; then
echo "Proposal $ID does not have a use.sh. Skipping."
exit 0
fi

source ./env_setup.sh

export SLOGFILE=slog.slog

PROPOSAL_PATH=$1

echo "Starting agd in the background."
startAgd

echo "Agd started. Running use.sh."
cd /usr/src/proposals/"$PROPOSAL_PATH/" || exit
cd "$PROPOSAL_PATH"
./use.sh

echo "Actions completed. Running for a few blocks and exiting."
Expand Down

0 comments on commit 4b36656

Please sign in to comment.