test: added codecov support #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "3.11" | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Python install | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.11" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip setuptools wheel | |
pip install -e .[test] | |
pip install coverage | |
- name: Tests | |
run: | | |
coverage run -m pytest | |
coverage xml | |
- name: Upload coverage reports to Codecov | |
uses: codecov/[email protected] | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
slug: violet-black/jsonschema-gen | |
- name: Upload coverage locally | |
uses: actions/upload-artifact@v3 | |
with: | |
name: jsonschema-gen | |
path: coverage.xml |