switch black action #36
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: Code tests | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.7 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.7" | |
architecture: "x64" | |
- name: Display Python version | |
run: python -c "import sys; print(sys.version)" | |
- name: Install packages | |
run: sudo apt-get install gcc ipmitool | |
- name: Cache pip | |
uses: actions/cache@v2 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
${{ runner.os }}- | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip wheel | |
pip install pytest pytest-cov | |
pip install -r requirements.txt | |
- name: Test with pytest pytest-cov | |
run: | | |
pytest --junitxml=junit/test-results.xml --cov=com --cov-report=xml --cov-report=html |