mirror of https://github.com/nucypher/nucypher.git
46 lines
1.2 KiB
YAML
46 lines
1.2 KiB
YAML
name: '📃 Contract Tests'
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
- development
|
|
|
|
concurrency:
|
|
group: ci-tests-${{ github.ref }}-contracts
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
contract-tests:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- id: setup_python
|
|
name: Set up Python 3.10 Environment
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
# Semantic version range syntax or exact version of a Python version
|
|
python-version: '3.10'
|
|
|
|
- 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]
|
|
|
|
- name: Install Solidity Compiler
|
|
run: python ./scripts/installation/install_solc.py
|
|
|
|
- name: Run Contract tests
|
|
run: python -m pytest tests/contracts
|