Skip to content

updated tests

updated tests #14

Workflow file for this run

name: Unit Tests
on:
push:
branches:
- master
# file paths to consider in the event
paths:
- 'conf/**'
- 'src/**'
- 'tests/**'
- 'docs/**'
- '!**.md'
- '.github/workflows/**'
pull_request:
branches:
- master
# file paths to consider in the event
paths:
- 'conf/**'
- 'src/**'
- 'tests/**'
- 'docs/**'
- '!**.md'
- '.github/workflows/**'
workflow_dispatch:
jobs:
unit-test-main:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
shell: bash
working-directory: tests
run: |
python -m pip install --upgrade pip
pip install wheel
pip3 install -r requirements.txt
- name: Remove coverage xml
run: |
rm -rf ./coverage.xml
- name: Unit Tests
timeout-minutes: 2
shell: bash
run: |
export IS_CI=true
export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python
python3 -m pytest
- name: Print Coverage Report
timeout-minutes: 2
shell: bash
run: |
coverage run -m pytest
coverage report -m
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}