Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.

feat: use boojum-integration branch of in-memory node for testing CI #43

Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
8c69402
ci: using boojum branch of test node
benceharomi Oct 16, 2023
52ac077
ci: nightly keyword removed
benceharomi Oct 16, 2023
ff8f0d3
test: reenable temporarily disabled tests
benceharomi Oct 16, 2023
bb716d0
ci: test node in background
benceharomi Oct 16, 2023
c0f88df
ci: caching for era-test-node
benceharomi Oct 17, 2023
6dccfe3
Revert "test: reenable temporarily disabled tests"
benceharomi Oct 17, 2023
852d635
Revert "Revert "test: reenable temporarily disabled tests""
benceharomi Oct 18, 2023
0b55350
chore: downgrading hardhat version to fix test execution
benceharomi Oct 18, 2023
504209a
Merge branch 'dev' into bh-evm-299-use-boojum-integration-branch-of-i…
benceharomi Oct 18, 2023
299550d
chore: hardhat version upgrade
benceharomi Oct 19, 2023
3d94932
fix: hardhat to previous version
benceharomi Oct 19, 2023
95b6f80
chore: hardhat v2.15
benceharomi Oct 19, 2023
18e9553
ci: ci to run on dev and main push
benceharomi Oct 19, 2023
95f0bd3
chore: set hardhat to fix v2.16.0
benceharomi Oct 19, 2023
e25b17f
ci: new rust cacheing
benceharomi Oct 19, 2023
87175dc
ci: syntax fix
benceharomi Oct 19, 2023
177bfc7
fix(ci): removed nightly+ keyword
benceharomi Oct 19, 2023
2875ea5
ci: rustup nightly command
benceharomi Oct 19, 2023
a646e49
ci: fix
benceharomi Oct 19, 2023
d6430aa
ci: add back old cacheing
benceharomi Oct 19, 2023
1d4ef41
ci: print era_test_node logs
benceharomi Oct 19, 2023
1d5b19d
ci: change tag to commit SHA of dependency
benceharomi Oct 20, 2023
2e47387
ci: test_bootloader cacheing
benceharomi Oct 20, 2023
6678fdf
Revert "ci: test_bootloader cacheing"
benceharomi Oct 20, 2023
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
27 changes: 24 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: "CI"

on: pull_request
on:
pull_request:
push:
branches:
- dev
- main

jobs:
build:
Expand Down Expand Up @@ -100,8 +105,17 @@ jobs:
node-version: 18.18.0
cache: yarn

- name: Use era-test-node for testing
uses: dutterbutter/era-test-node-action@latest
- name: Use Nightly Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: nightly-2023-04-17

- name: Use era_test_node for testing
uses: baptiste0928/cargo-install@v2
benceharomi marked this conversation as resolved.
Show resolved Hide resolved
with:
crate: era_test_node
git: https://github.com/matter-labs/era-test-node.git
branch: boojum-integration

- name: Install dependencies
run: yarn
Expand All @@ -119,9 +133,16 @@ jobs:
contracts/precompiles/artifacts
bootloader/build

- name: Start era_test_node
run: era_test_node run > /dev/null 2>&1 &

- name: Run tests
run: yarn test
benceharomi marked this conversation as resolved.
Show resolved Hide resolved

- name: Print output logs of era_test_node
if: always()
run: cat era_test_node.log

test_bootloader:
needs: [build, lint]
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"@nomiclabs/hardhat-solpp": "^2.0.1",
"commander": "^9.4.1",
"ethers": "^5.7.0",
"hardhat": "^2.11.0",
"hardhat": "=2.16.0",
"preprocess": "^3.2.0",
"zksync-web3": "^0.14.3"
},
Expand Down
22 changes: 11 additions & 11 deletions test/AccountCodeStorage.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ describe('AccountCodeStorage tests', function () {
).to.be.revertedWith('Callable only by the deployer system contract');
});

xit('failed to set with constructed bytecode', async () => {
it('failed to set with constructed bytecode', async () => {
await expect(
accountCodeStorage
.connect(deployerAccount)
.storeAccountConstructingCodeHash(RANDOM_ADDRESS, CONSTRUCTED_BYTECODE_HASH)
).to.be.revertedWith('Code hash is not for a contract on constructor');
});

xit('successfully stored', async () => {
it('successfully stored', async () => {
await accountCodeStorage
.connect(deployerAccount)
.storeAccountConstructingCodeHash(RANDOM_ADDRESS, CONSTRUCTING_BYTECODE_HASH);
Expand All @@ -67,15 +67,15 @@ describe('AccountCodeStorage tests', function () {
).to.be.revertedWith('Callable only by the deployer system contract');
});

xit('failed to set with constructing bytecode', async () => {
it('failed to set with constructing bytecode', async () => {
await expect(
accountCodeStorage
.connect(deployerAccount)
.storeAccountConstructedCodeHash(RANDOM_ADDRESS, CONSTRUCTING_BYTECODE_HASH)
).to.be.revertedWith('Code hash is not for a constructed contract');
});

xit('successfully stored', async () => {
it('successfully stored', async () => {
await accountCodeStorage
.connect(deployerAccount)
.storeAccountConstructedCodeHash(RANDOM_ADDRESS, CONSTRUCTED_BYTECODE_HASH);
Expand All @@ -95,7 +95,7 @@ describe('AccountCodeStorage tests', function () {
);
});

xit('failed to mark already constructed bytecode', async () => {
it('failed to mark already constructed bytecode', async () => {
await accountCodeStorage
.connect(deployerAccount)
.storeAccountConstructedCodeHash(RANDOM_ADDRESS, CONSTRUCTED_BYTECODE_HASH);
Expand All @@ -107,7 +107,7 @@ describe('AccountCodeStorage tests', function () {
await unsetCodeHash(accountCodeStorage, RANDOM_ADDRESS);
});

xit('successfully marked', async () => {
it('successfully marked', async () => {
await accountCodeStorage
.connect(deployerAccount)
.storeAccountConstructingCodeHash(RANDOM_ADDRESS, CONSTRUCTING_BYTECODE_HASH);
Expand All @@ -127,7 +127,7 @@ describe('AccountCodeStorage tests', function () {
expect(await accountCodeStorage.getRawCodeHash(RANDOM_ADDRESS)).to.be.eq(ethers.constants.HashZero);
});

xit('non-zero', async () => {
it('non-zero', async () => {
await accountCodeStorage
.connect(deployerAccount)
.storeAccountConstructedCodeHash(RANDOM_ADDRESS, CONSTRUCTED_BYTECODE_HASH);
Expand All @@ -152,7 +152,7 @@ describe('AccountCodeStorage tests', function () {
expect(await accountCodeStorage.getCodeHash(wallet.address)).to.be.eq(EMPTY_STRING_KECCAK);
});

xit('address in the constructor', async () => {
it('address in the constructor', async () => {
await accountCodeStorage
.connect(deployerAccount)
.storeAccountConstructingCodeHash(RANDOM_ADDRESS, CONSTRUCTING_BYTECODE_HASH);
Expand All @@ -162,7 +162,7 @@ describe('AccountCodeStorage tests', function () {
await unsetCodeHash(accountCodeStorage, RANDOM_ADDRESS);
});

xit('constructed code hash', async () => {
it('constructed code hash', async () => {
await accountCodeStorage
.connect(deployerAccount)
.storeAccountConstructedCodeHash(RANDOM_ADDRESS, CONSTRUCTED_BYTECODE_HASH);
Expand All @@ -188,7 +188,7 @@ describe('AccountCodeStorage tests', function () {
expect(await accountCodeStorage.getCodeSize('0x0000000000000000000000000000000000000001')).to.be.eq(0);
});

xit('address in the constructor', async () => {
it('address in the constructor', async () => {
await accountCodeStorage
.connect(deployerAccount)
.storeAccountConstructingCodeHash(RANDOM_ADDRESS, CONSTRUCTING_BYTECODE_HASH);
Expand All @@ -198,7 +198,7 @@ describe('AccountCodeStorage tests', function () {
await unsetCodeHash(accountCodeStorage, RANDOM_ADDRESS);
});

xit('non-zero size', async () => {
it('non-zero size', async () => {
await accountCodeStorage
.connect(deployerAccount)
.storeAccountConstructedCodeHash(RANDOM_ADDRESS, CONSTRUCTED_BYTECODE_HASH);
Expand Down
2 changes: 1 addition & 1 deletion test/ComplexUpgrader.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('ComplexUpgrader tests', function () {
).to.be.revertedWith('Can only be called by FORCE_DEPLOYER');
});

xit('successfully upgraded', async () => {
it('successfully upgraded', async () => {
await network.provider.request({
method: 'hardhat_impersonateAccount',
params: [FORCE_DEPLOYER_ADDRESS]
Expand Down
2 changes: 1 addition & 1 deletion test/Compressor.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
} from './shared/constants';
import { deployContract, getCode, getWallets, loadArtifact, setCode } from './shared/utils';

xdescribe('Compressor tests', function () {
describe('Compressor tests', function () {
let wallet: Wallet;
let compressor: Compressor;
let bootloader: ethers.Signer;
Expand Down
2 changes: 1 addition & 1 deletion test/ContractDeployer.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
} from './shared/constants';
import { deployContract, getCode, getWallets, loadArtifact, publishBytecode, setCode } from './shared/utils';

xdescribe('ContractDeployer tests', function () {
describe('ContractDeployer tests', function () {
let wallet: Wallet;
let contractDeployer: ContractDeployer;
let contractDeployerSystemCall: ContractDeployer;
Expand Down
2 changes: 1 addition & 1 deletion test/DefaultAccount.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
import { signedTxToTransactionData } from './shared/transactions';
import { deployContract, getWallets, loadArtifact, setCode } from './shared/utils';

xdescribe('DefaultAccount tests', function () {
describe('DefaultAccount tests', function () {
let wallet: Wallet;
let account: Wallet;
let defaultAccount: DefaultAccount;
Expand Down
2 changes: 1 addition & 1 deletion test/EventWriter.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { EventWriterTest } from '../typechain-types';
import { EVENT_WRITER_CONTRACT_ADDRESS } from './shared/constants';
import { deployContract, getCode, getWallets, setCode } from './shared/utils';

xdescribe('EventWriter tests', function () {
describe('EventWriter tests', function () {
let wallet: Wallet;
let eventWriter: Contract;
let eventWriterTest: EventWriterTest;
Expand Down
2 changes: 1 addition & 1 deletion test/ImmutableSimulator.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ describe('ImmutableSimulator tests', function () {
);
});

xit('successfully set', async () => {
it('successfully set', async () => {
await network.provider.request({
method: 'hardhat_impersonateAccount',
params: [DEPLOYER_SYSTEM_CONTRACT_ADDRESS]
Expand Down
2 changes: 1 addition & 1 deletion test/KnownCodesStorage.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
} from './shared/constants';
import { deployContract, getCode, getWallets, loadArtifact, setCode } from './shared/utils';

xdescribe('KnownCodesStorage tests', function () {
describe('KnownCodesStorage tests', function () {
let wallet: Wallet;
let knownCodesStorage: KnownCodesStorage;
let mockL1Messenger: MockL1Messenger;
Expand Down
Loading
Loading