update deployed URLs in Readme #107
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Adapted from https://limcheekin.medium.com/solidity-and-truffle-continuous-integration-setup-with-github-actions-221149eabcca | |
name: Truffle Tests Extended | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup NodeJS 16 | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '16' | |
- name: Show NodeJS version | |
run: npm --version | |
# - name: Create .env file | |
# run: echo "${{ secrets.DOT_ENV }}" > .env | |
- name: Install Truffle and ganache | |
run: npm install [email protected] ganache-cli -g # version needed because of bug https://github.com/trufflesuite/truffle/issues/5074 | |
- name: Install Truffle Dependencies | |
run: npm install | |
- name: Run Truffle Test with CI=true for Codechecks | |
run: | | |
ganache-cli & | |
CI=true truffle test | |
# - name: Run Codechecks | |
# run: npx codechecks | |
# - name: Run Test Coverage | |
# run: truffle run coverage | |
# - name: Generate .coveralls.yml file | |
# run: echo "${{ secrets.DOT_COVERALLS_YML }}" > .coveralls.yml | |
# - name: Send Coverage Info to CoverAlls | |
# run: cat coverage/lcov.info | npx coveralls | |
# - name: Setup Python 3.8 | |
# uses: actions/setup-python@v2 | |
# with: | |
# python-version: 3.8 # Version range or exact version of a Python version to use, using SemVer's version range syntax | |
# architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified | |
# - name: Show Python version | |
# run: python --version | |
# - name: Clone SmartBugs Repo | |
# run: git clone https://github.com/smartbugs/smartbugs.git | |
# - name: Remove SmartBugs Results and Install SmartBugs Dependencies | |
# run: cd smartbugs;rm -r results;pip install -r requirements.txt | |
# - name: Run SmartBugs Analysis | |
# run: | | |
# solidityFiles=($(ls -I Migrations.sol contracts)) | |
# DIR=$(pwd);cd smartbugs | |
# for sol in "${solidityFiles[@]}" | |
# do | |
# echo "Analysing $sol..." | |
# python smartBugs.py --tool all --file $DIR/contracts/$sol | |
# done | |
# - name: Move SmartBugs Results to Parent Directory | |
# run: | | |
# [[ -d results ]] && rm -r results | |
# cd smartbugs | |
# mv results ../ | |
# - name: Commit SmartBugs Results | |
# uses: EndBug/add-and-commit@v7 | |
# with: | |
# author_name: github-actions | |
# author_email: [email protected] | |
# message: 'chore: added smartbugs results' | |
# add: 'results' |