Merge branch 'master' of https://github.com/zxdavb/evohome-async #7
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
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | ||
name: Test with pytest | ||
on: workflow_dispatch | ||
# push: | ||
# branches: [ "master" ] | ||
# pull_request: | ||
# branches: [ "master" ] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.11"] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | ||
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi | ||
- name: Lint with ruff | ||
# https://docs.astral.sh/ruff/integrations/#github-actions | ||
uses: chartboost/ruff-action@v1 | ||
- name: Check with mypy | ||
run: pip install mypy | ||
run: mypy . | ||
- name: Install the package | ||
run: | | ||
pip install -e . | ||
- name: Test with pytest | ||
run: | | ||
pytest | ||
- name: Test with without voluptuous | ||
run: | | ||
pip uninstall -y voluptuous | ||
pytest | ||
continue-on-error: true | ||
- run: echo "🍏 This job's status is ${{ job.status }}." |