eth-erc20/.gitlab-ci.yml

43 lines
1.3 KiB
YAML
Raw Normal View History

2021-11-24 22:03:14 +01:00
stages:
- test
- slither-analyzer
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
cache:
paths:
- .cache/pip
- venv/
before_script:
- python -V # Print out python version for debugging
- pip install virtualenv
- virtualenv venv
- source venv/bin/activate
2021-11-24 22:03:14 +01:00
test:
image: registry.gitlab.com/grassrootseconomics/cic-base-images/ci-solc-python:latest
2021-11-24 22:03:14 +01:00
script:
# build abi
- 'echo "Running Solc Version: $(solc --version)"'
- cd solidity
- solc --evm-version=byzantium GiftableToken.sol --abi | awk 'NR>3' > GiftableToken.abi.json
# build bin
- solc GiftableToken.sol --bin | awk 'NR>3' > GiftableToken.bin &&
truncate -s "$((`stat -t -c "%s" GiftableToken.bin`-1))" GiftableToken.bin
# install test dependencies
- cd ../python
- export PYTHONPATH=.
- pip install --extra-index-url https://pip.grassrootseconomics.net
--extra-index-url https://gitlab.com/api/v4/projects/27624814/packages/pypi/simple
-r requirements.txt -r test_requirements.txt
# run tests
- bash run_tests.sh
2021-11-24 22:03:14 +01:00
slither-analize:
image: registry.gitlab.com/grassrootseconomics/cic-base-images/ci-solc-python:latest
allow_failure: true
2021-11-24 22:03:14 +01:00
script:
- slither solidity/