Skip to content

[2024] Modernize development environment (devcontainer, pre-commit etc) #75

[2024] Modernize development environment (devcontainer, pre-commit etc)

[2024] Modernize development environment (devcontainer, pre-commit etc) #75

Workflow file for this run

name: Test (pytest)
on:
pull_request:
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10"]
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements_test.txt
- name: Register Python problem matcher
run: |
echo "::add-matcher::.github/workflows/matchers/python.json"
# - name: Install Pytest Annotation plugin
# run: |
# # Ideally this should be part of our dependencies
# # However this plugin is fairly new and doesn't run correctly
# # on a non-GitHub environment.
# pip install pytest-github-actions-annotate-failures
# - name: Test with pytest
# run: |
# pytest \
# --cov custom_components/sagemcom_fast \
# --cov-report=xml --cov-report=html \
# -o console_output_style=count \
# -p no:sugar \
# tests
# - name: Upload coverage artifact
# uses: actions/[email protected]
# with:
# name: coverage-${{ matrix.python-version }}
# path: htmlcov