Old election test #2956
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Simulate Release | |
on: | |
pull_request: {} | |
push: | |
branches: | |
- "main" | |
jobs: | |
simulate-release: | |
runs-on: ubuntu-latest | |
env: | |
CANNON_SETTINGS: ${{ secrets.CANNON_SETTINGS }} | |
INFURA_API_KEY: ${{ secrets.INFURA_API_KEY }} | |
CANNON_IPFS_URL: "http://127.0.0.1:5001" | |
CANNON_PUBLISH_IPFS_URL: "http://127.0.0.1:5001" | |
strategy: | |
fail-fast: false | |
matrix: | |
workspace: [ | |
"@synthetixio/main", | |
"@synthetixio/oracle-manager", | |
# "@synthetixio/governance", TODO: enable after deployed | |
# "@synthetixio/legacy-market", TODO: enable after v2x is updated | |
"@synthetixio/spot-market", | |
# "@synthetixio/perps-market", TODO: enable after deployed | |
] | |
include: | |
- workspace: "@synthetixio/main" | |
cannonPackage: "synthetix" | |
impersonate: "0x48914229deDd5A9922f44441ffCCfC2Cb7856Ee9" | |
proxy: "InitialCoreProxy" | |
chains: "mainnet optimistic-mainnet goerli optimistic-goerli" | |
- workspace: "@synthetixio/oracle-manager" | |
cannonPackage: "oracle-manager" | |
impersonate: "0x48914229deDd5A9922f44441ffCCfC2Cb7856Ee9" | |
proxy: "InitialProxy" | |
chains: "mainnet optimistic-mainnet goerli optimistic-goerli" | |
# - workspace: "@synthetixio/governance" | |
# cannonPackage: "governance" | |
# impersonate: "0x48914229deDd5A9922f44441ffCCfC2Cb7856Ee9" | |
# proxy: "InitialProxy" | |
# chains: "mainnet optimistic-mainnet goerli optimistic-goerli" | |
# - workspace: "@synthetixio/legacy-market" | |
# cannonPackage: "synthetix-legacy-market" | |
# impersonate: "0x48914229deDd5A9922f44441ffCCfC2Cb7856Ee9" | |
# proxy: "InitialProxy" | |
# chains: "mainnet optimistic-mainnet goerli optimistic-goerli" | |
- workspace: "@synthetixio/spot-market" | |
cannonPackage: "synthetix-spot-market" | |
impersonate: "0x48914229deDd5A9922f44441ffCCfC2Cb7856Ee9" | |
proxy: "InitialProxy" | |
chains: "optimistic-mainnet optimistic-goerli" | |
# - workspace: "@synthetixio/perps-market" | |
# cannonPackage: "synthetix-perps-market" | |
# impersonate: "0x48914229deDd5A9922f44441ffCCfC2Cb7856Ee9" | |
# proxy: "InitialProxy" | |
# chains: "mainnet optimistic-mainnet goerli optimistic-goerli" | |
steps: | |
- name: Install Foundry (Cannon) | |
uses: foundry-rs/foundry-toolchain@v1 | |
with: | |
version: nightly | |
- run: anvil -V | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: "16.20.1" | |
cache: "yarn" | |
- uses: ibnesayeed/setup-ipfs@92d412e0dad36c06ffab50733e9c624896a0964f | |
with: | |
run_daemon: true | |
- run: yarn install --immutable --immutable-cache | |
- run: yarn workspaces foreach --topological-dev --recursive --verbose --from ${{ matrix.workspace }} run build:ts | |
- name: "Simulate release of '${{ matrix.cannonPackage }}' on chains '${{ matrix.chains }}'" | |
run: | | |
CHAINS="${{ matrix.chains }}" | |
WORKSPACE="${{ matrix.workspace }}" | |
for CHAIN in $CHAINS; do | |
echo | |
echo | |
echo | |
echo "...Checking $WORKSPACE on $CHAIN" | |
yarn workspace ${{ matrix.workspace }} exec \ | |
hardhat cannon:build \ | |
--dry-run \ | |
--network $CHAIN \ | |
--upgrade-from ${{ matrix.cannonPackage }}:latest \ | |
--impersonate ${{ matrix.impersonate }} | tee deployment.log | |
grep 'Successfully built package ${{ matrix.cannonPackage }}' deployment.log | |
if [ $(grep -c 'exec: contract.${{ matrix.proxy }}' deployment.log) -gt 0 ]; then | |
echo "Proxy ${{ matrix.proxy }} was modified" | |
exit 1 | |
fi | |
done |