mirror of
https://github.com/chaintool-py/eth-erc20.git
synced 2024-11-22 09:46:46 +01:00
Merge branch 'add-tests' into 'master'
feat: add slither and unit test run See merge request cicnet/eth-erc20!4
This commit is contained in:
commit
c236a9ea78
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,3 +4,4 @@ dist/
|
|||||||
build/
|
build/
|
||||||
gmon.out
|
gmon.out
|
||||||
*.egg-info
|
*.egg-info
|
||||||
|
.venv/
|
||||||
|
26
.gitlab-ci.yml
Normal file
26
.gitlab-ci.yml
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
stages:
|
||||||
|
- test
|
||||||
|
- slither-analyzer
|
||||||
|
|
||||||
|
test:
|
||||||
|
image: registry.gitlab.com/grassrootseconomics/cic-base-images/ci-solc-py-alpine:latest
|
||||||
|
cache:
|
||||||
|
- key:
|
||||||
|
files:
|
||||||
|
- requirements.txt
|
||||||
|
- test_requirements.txt
|
||||||
|
paths:
|
||||||
|
- /root/.cache/pip
|
||||||
|
script:
|
||||||
|
- cd python
|
||||||
|
- pip install --extra-index-url https://pip.grassrootseconomics.net:8433 -r test_requirements.txt
|
||||||
|
- pip install --extra-index-url https://pip.grassrootseconomics.net:8433 -r test_requirements.txt
|
||||||
|
- bash run_tests.sh
|
||||||
|
|
||||||
|
|
||||||
|
slither-analize:
|
||||||
|
image: registry.gitlab.com/grassrootseconomics/cic-base-images/ci-solc-py-alpine:latest
|
||||||
|
script:
|
||||||
|
- pip install slither-analyzer
|
||||||
|
- slither solidity/
|
||||||
|
|
@ -5,7 +5,8 @@ FROM python:3.8.6-alpine
|
|||||||
COPY --from=0 /usr/bin/solc /usr/bin/solc
|
COPY --from=0 /usr/bin/solc /usr/bin/solc
|
||||||
|
|
||||||
RUN apk update &&\
|
RUN apk update &&\
|
||||||
apk add gcc bash musl-dev
|
apk add gcc bash musl-dev libffi-dev openssl-dev autoconf automake build-base \
|
||||||
|
libtool pkgconfig python3-dev cargo
|
||||||
|
|
||||||
WORKDIR /usr/src
|
WORKDIR /usr/src
|
||||||
|
|
||||||
@ -14,6 +15,8 @@ WORKDIR /usr/src
|
|||||||
COPY ./solidity/ /usr/src/giftable_erc20_token/solidity/
|
COPY ./solidity/ /usr/src/giftable_erc20_token/solidity/
|
||||||
COPY ./python/ /usr/src/giftable_erc20_token/python/
|
COPY ./python/ /usr/src/giftable_erc20_token/python/
|
||||||
|
|
||||||
|
RUN chmod +x ./python/run_tests.sh
|
||||||
|
|
||||||
RUN cd giftable_erc20_token/solidity && \
|
RUN cd giftable_erc20_token/solidity && \
|
||||||
solc GiftableToken.sol --abi | awk 'NR>3' > GiftableToken.abi.json
|
solc GiftableToken.sol --abi | awk 'NR>3' > GiftableToken.abi.json
|
||||||
|
|
||||||
@ -24,5 +27,7 @@ RUN cd giftable_erc20_token/solidity && \
|
|||||||
RUN cd giftable_erc20_token/python && \
|
RUN cd giftable_erc20_token/python && \
|
||||||
pip install --extra-index-url https://pip.grassrootseconomics.net:8433 .
|
pip install --extra-index-url https://pip.grassrootseconomics.net:8433 .
|
||||||
|
|
||||||
|
RUN pip install slither-analyzer
|
||||||
|
|
||||||
# To deploy:
|
# To deploy:
|
||||||
# giftable-token-deploy --contracts-dir giftable_erc20_token/solidity/ <amount>
|
# giftable-token-deploy --contracts-dir giftable_erc20_token/solidity/ <amount>
|
||||||
|
Loading…
Reference in New Issue
Block a user