Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: define the CI env var when running in CI #137

Merged
merged 4 commits into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cleaner 💯


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