Skip to content

Add type error handling #22

Add type error handling

Add type error handling #22

Workflow file for this run

name: Code Coverage
on:
pull_request:
branches:
- main
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.11
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install coverage
- name: Run tests with coverage
run: |
coverage erase
coverage run -m unittest discover -s tests
result=$(coverage report -m)
result_with_backticks="\`\`\`\n$result"
echo "$result_with_backticks" > coverage_report.txt
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Comment PR
uses: thollander/actions-comment-pull-request@v2
with:
filePath: coverage_report.txt