Skip to content

Change machine

Change machine #826

Workflow file for this run

concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.ref }}
env:
BUCKET_NAME: 'agoric-snapshots-public'
IMAGE_NAME: ${{ github.repository }}
REGISTRY: 'ghcr.io'
PROJECT_ID: 60745596728
jobs:
test-package:
runs-on: 'ubuntu-latest'
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Install deps
run: |
# Enable corepack for packageManager config
corepack enable || sudo corepack enable
yarn install
- name: Lint repo
run: yarn lint
- name: Typecheck synthetic-chain
run: yarn tsc
working-directory: packages/synthetic-chain
- name: Test synthetic-chain
run: yarn test
working-directory: packages/synthetic-chain
test-proposals:
permissions:
contents: read
id-token: write
packages: write
runs-on: 'depot-ubuntu-22.04-16'
steps:
- name: free up disk space
run: |
df -h
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
echo "=== After cleanup:"
df -h
- name: Generate Timestamp
run: echo "TIMESTAMP=$(date '+%s')" >> $GITHUB_ENV
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Cloud SDK auth
uses: google-github-actions/auth@v2
with:
project_id: ${{ env.PROJECT_ID }}
workload_identity_provider: projects/${{ env.PROJECT_ID }}/locations/global/workloadIdentityPools/github/providers/${{ github.event.repository.name }}
- name: Set up gcloud
uses: google-github-actions/setup-gcloud@v2
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
password: ${{ secrets.GITHUB_TOKEN }}
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
- name: Install deps
run: |
corepack enable || sudo corepack enable
yarn install
- name: Build image
run: yarn build
- name: Build and run proposal tests
run: yarn test
- name: Upload state to storage
run: |
#! /bin/bash
set -o errexit -o errtrace
IMAGE_ID="${{ env.REGISTRY }}/${{ github.repository }}"
TAG="use-fast-usdc-beta"
TIMESTAMP="$(date '+%s')"
if test -z "$(docker image ls --filter "reference=$IMAGE_ID:$TAG" --format json)"
then
echo "Pulling image $IMAGE_ID:$TAG"
docker pull --quiet "$IMAGE_ID:$TAG"
fi
CONTAINER_ID="$(docker container run --detach --entrypoint /bin/sleep "$IMAGE_ID:$TAG" infinity)"
docker exec "$CONTAINER_ID" /bin/bash -c "
ls --almost-all \$HOME/.agoric | \
grep --extended-regexp --invert-match '^(config|data|keyring-test)$' | \
xargs -I {} rm --force --recursive \$HOME/.agoric/{} && \
echo \"Zipping state of size \$(du --human-readable --null --summarize \$HOME/.agoric | awk '{printf \"%s\", \$1}')\" && \
tar --create --file \"/tmp/state-$TIMESTAMP\" --directory \$HOME/.agoric --gzip .
"
docker container cp --quiet "$CONTAINER_ID:/tmp/state-$TIMESTAMP" "/tmp/state-$TIMESTAMP"
docker container stop "$CONTAINER_ID" > /dev/null
docker container rm "$CONTAINER_ID" > /dev/null
gsutil cp "/tmp/state-$TIMESTAMP" gs://${{ env.BUCKET_NAME }}/a3p-emerynet/state-$TIMESTAMP.tar.gz
timeout-minutes: 60
name: Proposal tests
on:
push:
branches: [usman/reset-emerynet]