Checking tests against cpondoc push #148
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: Automated Building and Testing | |
run-name: Checking tests against ${{ github.actor }} push | |
on: [push] | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python version | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.9" | |
- name: Install tools to install package to runner | |
run: python -m pip install setuptools wheel | |
- run: cd ${{ github.workspace }} | |
- name: Create distribution files for package | |
run: python pyrorl/setup.py sdist -d pyrorl/dist | |
- name: Install package locally | |
run: pip install -e pyrorl | |
- name: Install pytest for testing | |
run: python -m pip install pytest pytest-mock pytest-cov | |
- name: Run tests | |
run: python -m pytest -s | |
- name: Generate code coverage file | |
run: python -m pytest --cov . | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v3 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |