nucypher/.github/workflows/python_tests.yml

104 lines
3.8 KiB
YAML
Raw Normal View History

name: '🔎 Python Tests'
on:
pull_request:
types: [opened, reopened, edited, ready_for_review, synchronize]
concurrency:
group: ci-tests-${{ github.ref }}-pytest
cancel-in-progress: true
jobs:
python-tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.7", "3.10" ]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[dev]
2022-10-30 16:59:27 +00:00
- name: Install Solidity Compiler
run: python ./scripts/installation/install_solc.py
- name: Check Python Entrypoint
run: python -c "import nucypher; print(nucypher.__version__)"
- name: Unit Tests
run: python -m pytest --cov-report=xml:unit-coverage.xml tests/unit
- name: Upload unit tests coverage to Codecov
if: matrix.python-version == '3.10'
uses: codecov/codecov-action@v3.1.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: unit-coverage.xml
flags: unit
verbose: true
- name: Integration Tests
run: python -m pytest --cov-report=xml:integration-coverage.xml tests/integration
- name: Upload integration tests coverage to Codecov
if: matrix.python-version == '3.10'
uses: codecov/codecov-action@v3.1.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: integration-coverage.xml
flags: integration
verbose: true
# Acceptance tests
- name: Agents Tests
run: python -m pytest --cov-report=xml:acceptance-blockchain-agents-coverage.xml tests/acceptance/blockchain/agents
- name: Actors Tests
run: python -m pytest --cov-report=xml:acceptance-blockchain-actors-coverage.xml tests/acceptance/blockchain/actors
- name: Deployers Tests
run: python -m pytest --cov-report=xml:acceptance-blockchain-deployers-coverage.xml tests/acceptance/blockchain/deployers
- name: Interfaces Tests
run: python -m pytest --cov-report=xml:acceptance-blockchain-interfaces-coverage.xml tests/acceptance/blockchain/interfaces
- name: Conditions Tests
run: python -m pytest --cov-report=xml:acceptance-blockchain-conditions-coverage.xml tests/acceptance/blockchain/conditions
- name: Characters Tests
run: python -m pytest --cov-report=xml:acceptance-characters-coverage.xml tests/acceptance/characters
- name: Node Discovery Tests
run: python -m pytest --cov-report=xml:acceptance-learning-coverage.xml tests/acceptance/learning
- name: Network Tests
run: python -m pytest --cov-report=xml:acceptance-network-coverage.xml tests/acceptance/network
- name: Utility Tests
run: python -m pytest --cov-report=xml:acceptance-utilities-coverage.xml tests/acceptance/utilities
- name: Check CLI Entrypoint
run: nucypher --help
- name: CLI Tests
run: python -m pytest --cov-report=xml:acceptance-cli-coverage.xml tests/acceptance/cli
2022-11-11 19:57:53 +00:00
- name: Upload acceptance tests coverage to Codecov
2022-11-11 19:57:53 +00:00
if: matrix.python-version == '3.10'
uses: codecov/codecov-action@v3.1.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: acceptance-blockchain-agents-coverage.xml, acceptance-blockchain-actors-coverage.xml, acceptance-blockchain-deployers-coverage.xml, acceptance-blockchain-interfaces-coverage.xml, acceptance-blockchain-conditions-coverage.xml, acceptance-characters-coverage.xml, acceptance-learning-coverage.xml, acceptance-network-coverage.xml, acceptance-utilities-coverage.xml, acceptance-cli-coverage.xml
flags: acceptance
verbose: true