56 lines
1.3 KiB
YAML
56 lines
1.3 KiB
YAML
version: 2.0
|
|
|
|
jobs:
|
|
build:
|
|
docker:
|
|
- image: cimg/python:3.8.1
|
|
steps:
|
|
- checkout
|
|
- run:
|
|
name: Install solidity
|
|
command: |
|
|
sudo add-apt-repository ppa:ethereum/ethereum
|
|
sudo apt-get update
|
|
sudo apt-get install solc
|
|
- run:
|
|
name: Compile the contract
|
|
command: make
|
|
- run:
|
|
name: Run eth2.0-specs tests
|
|
command: |
|
|
sudo apt-get install -y python3-venv
|
|
git clone https://github.com/ethereum/eth2.0-specs
|
|
cp -f deposit_contract.json eth2.0-specs/deposit_contract/contracts/validator_registration.json
|
|
cd eth2.0-specs
|
|
make install_deposit_contract_tester
|
|
make test_deposit_contract
|
|
- persist_to_workspace:
|
|
root: .
|
|
paths:
|
|
- combined.json
|
|
- lib
|
|
|
|
test:
|
|
docker:
|
|
- image: nixorg/nix:circleci
|
|
steps:
|
|
- checkout
|
|
- attach_workspace:
|
|
at: /tmp/
|
|
- run:
|
|
name: Test the contract
|
|
command: |
|
|
cp /tmp/combined.json .
|
|
cp -r /tmp/lib/* lib
|
|
nix-shell --command 'make test'
|
|
|
|
workflows:
|
|
version: 2
|
|
|
|
build_and_test:
|
|
jobs:
|
|
- build
|
|
- test:
|
|
requires:
|
|
- build
|