Multiple python version tests #1
This file contains hidden or 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: Run Tests | |
on: | |
workflow_dispatch: # Allow manual triggers | |
schedule: | |
- cron: 0 0 * * * | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install Python 3 | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
pip install coverage | |
- name: Run Tests | |
run: | | |
python -m unittest discover tests | |
- name: Run torch testsuite | |
run: coverage run --parallel-mode -m --omit "*__init__.py" --include "pynncml/**/*.py" unittest discover -v | |
- name: Combine Multiple Coverage Files | |
run: coverage combine | |
- name: Run Coverage HTML | |
run: coverage html -i --directory ./coverage_report_html | |
- name: Archive code coverage results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: code-coverage-report | |
path: | | |
coverage_report_html |