Skip to content

Commit

Permalink
Merge pull request #137 from liquity/define-ci
Browse files Browse the repository at this point in the history
ci: define the CI env var when running in CI
  • Loading branch information
danielattilasimon authored Apr 30, 2024
2 parents 72fc823 + 6cfaa81 commit 5b5836c
Show file tree
Hide file tree
Showing 4 changed files with 9,514 additions and 13,561 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/contracts-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ jobs:
cache-dependency-path: "pnpm-lock.yaml"

- name: Install dependencies
run: pnpm install
run: pnpm install --frozen-lockfile

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
Expand Down Expand Up @@ -151,7 +151,7 @@ jobs:
cache-dependency-path: "pnpm-lock.yaml"

- name: Install dependencies
run: pnpm install
run: pnpm install --frozen-lockfile

- name: harhdat coverage
run: pnpm coverage
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/testnet-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ on:
- "contracts/**"

env:
CI: true
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
FOUNDRY_VERSION: nightly-f625d0fa7c51e65b4bf1e8f7931cd1c6e2e285e9

Expand Down Expand Up @@ -48,7 +49,7 @@ jobs:
cache-dependency-path: "pnpm-lock.yaml"

- name: Install dependencies
run: pnpm install
run: pnpm install --frozen-lockfile
working-directory: ./contracts

- name: Install Foundry
Expand Down Expand Up @@ -85,7 +86,7 @@ jobs:
version: 8

- name: Install dependencies
run: pnpm install
run: pnpm install --frozen-lockfile

- name: Install Vercel CLI
run: pnpm install --global vercel@canary
Expand Down Expand Up @@ -138,7 +139,7 @@ jobs:
version: 8

- name: Install dependencies
run: pnpm install
run: pnpm install --frozen-lockfile

- name: Install Vercel CLI
run: pnpm install --global vercel@canary
Expand Down
13 changes: 8 additions & 5 deletions contracts/utils/deploy-cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,16 +141,19 @@ Deploying Liquity contracts with the following settings:
VERIFIER_URL: ${options.verifierUrl}
`;

const envVars = [
`DEPLOYER=${options.deployer}`,
];
process.env.DEPLOYER = options.deployer;

if (options.openDemoTroves) {
envVars.push("OPEN_DEMO_TROVES=true");
process.env.OPEN_DEMO_TROVES = "true";
}

if ("CI" in process.env) {
echo("Workaround: deleting variable 'CI' from environment"); // See https://github.com/liquity/bold/pull/113
delete process.env.CI;
}

// deploy
await $`${envVars} forge ${forgeArgs}`;
await $`forge ${forgeArgs}`;

const deployedContracts = await getDeployedContracts(
`broadcast/DeployLiquity2.s.sol/${options.chainId}/run-latest.json`,
Expand Down
Loading

0 comments on commit 5b5836c

Please sign in to comment.