Skip to content

test

test #4

Workflow file for this run

name: test
on:
workflow_dispatch:
# uncomment to make it runnable after each push into master
#push:
# branches: [ master ]
#pull_request:
# branches: [ master ]
jobs:
pytest:
name: pytest
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.10]
steps:
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: "3.10"
- name: Checkout 🛎️
uses: actions/checkout@v2
- name: Install Dependencies
run: |
pip install -U pytest>=7.2.0 pytest-cov>=4.0.0
pip install -U -r src/requirements.txt
- name: Testing
run: |
PYTHONPATH=src/ pytest tests/ --cov=mylib --cov-report=xml
- name: Generate coverage badge
run: |
python badge_generator.py
- name: Upload coverage badge
uses: actions/upload-artifact@v2
with:
name: coverage-badge
path: coverage-badge.svg