name: PyTest # yamllint disable-line rule:truthy on: push: branches: master pull_request: jobs: pytest: name: PyTest runs-on: ubuntu-latest strategy: matrix: python: ["3.7", "3.8", "3.9"] env: PYTHON: ${{ matrix.python }} steps: - name: Checkout uses: actions/checkout@v2 - name: Set up Python uses: actions/setup-python@v2 with: python-version: ${{ matrix.python }} - name: Install dependencies run: | python -m pip install --upgrade pip pip install pytest pytest-cov - name: PyTest run: | pytest --cov=./rpi_bad_power --cov-report=xml - name: Upload coverage to Codecov uses: codecov/codecov-action@v1 with: file: ./coverage.xml env_vars: PYTHON fail_ci_if_error: true path_to_write_report: ./codecov_report.gz verbose: true