2022-10-30 17:52:21 +00:00
|
|
|
name: '📃 Contract Tests'
|
|
|
|
|
2022-11-10 01:21:58 +00:00
|
|
|
on:
|
|
|
|
pull_request:
|
2022-11-25 16:11:17 +00:00
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
- development
|
2022-10-30 17:52:21 +00:00
|
|
|
|
|
|
|
concurrency:
|
2022-11-10 01:33:51 +00:00
|
|
|
group: ci-tests-${{ github.ref }}-contracts
|
2022-10-30 17:52:21 +00:00
|
|
|
cancel-in-progress: true
|
2022-10-30 16:56:49 +00:00
|
|
|
|
|
|
|
jobs:
|
2022-11-02 16:18:57 +00:00
|
|
|
contract-tests:
|
2022-10-30 16:56:49 +00:00
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
2022-11-25 17:22:12 +00:00
|
|
|
- id: setup_python
|
|
|
|
name: Set up Python 3.10 Environment
|
2022-10-30 16:56:49 +00:00
|
|
|
uses: actions/setup-python@v4
|
2022-10-30 17:52:21 +00:00
|
|
|
with:
|
|
|
|
# Semantic version range syntax or exact version of a Python version
|
|
|
|
python-version: '3.10'
|
2022-11-25 17:22:12 +00:00
|
|
|
|
|
|
|
- id: python_cache
|
|
|
|
name: Retrieve Cached Python Dependencies
|
|
|
|
uses: actions/cache@v3
|
|
|
|
with:
|
|
|
|
path: ${{ env.pythonLocation }}
|
|
|
|
key: ${{ runner.os }}-pip-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('dev-requirements.txt', 'requirements.txt') }}
|
|
|
|
|
|
|
|
- name: Install Dependencies
|
|
|
|
if: steps.python_cache.outputs.cache-hit != 'true'
|
|
|
|
run: |
|
|
|
|
python -m pip install --upgrade pip
|
|
|
|
pip install .[dev]
|
2022-10-30 16:56:49 +00:00
|
|
|
|
2022-10-30 16:59:27 +00:00
|
|
|
- name: Install Solidity Compiler
|
|
|
|
run: python ./scripts/installation/install_solc.py
|
2022-10-30 16:56:49 +00:00
|
|
|
|
|
|
|
- name: Run Contract tests
|
2022-11-02 16:18:57 +00:00
|
|
|
run: python -m pytest tests/contracts
|