75 lines
1.7 KiB
YAML
75 lines
1.7 KiB
YAML
version: 2.1
|
|
|
|
jobs:
|
|
build:
|
|
docker:
|
|
- image: ethereum/solc:0.6.8-alpine
|
|
steps:
|
|
- checkout
|
|
- run:
|
|
name: Install build essentials
|
|
command: |
|
|
apk update
|
|
apk add git make
|
|
- run:
|
|
name: Compile the contract
|
|
command: make
|
|
- persist_to_workspace:
|
|
root: .
|
|
paths:
|
|
- deposit_contract.json
|
|
- combined.json
|
|
- lib
|
|
|
|
spectest:
|
|
docker:
|
|
- image: cimg/python:3.8.1
|
|
steps:
|
|
- checkout
|
|
- attach_workspace:
|
|
at: /tmp/
|
|
- run:
|
|
name: Update python3
|
|
command: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y python3-venv
|
|
- run:
|
|
name: Install eth2.0-specs tests
|
|
command: |
|
|
git clone https://github.com/ethereum/eth2.0-specs --single-branch --branch v0.11.2
|
|
cp -f /tmp/deposit_contract.json eth2.0-specs/deposit_contract/contracts/validator_registration.json
|
|
cd eth2.0-specs
|
|
make install_deposit_contract_tester
|
|
- run:
|
|
name: Run eth2.0-specs tests
|
|
command: |
|
|
cd eth2.0-specs
|
|
make test_deposit_contract
|
|
|
|
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
|
|
- spectest:
|
|
requires:
|
|
- build
|
|
- test:
|
|
requires:
|
|
- spectest
|