mirror of
https://github.com/esphome/aioesphomeapi.git
synced 2024-12-27 17:37:39 +01:00
Ensure we are testing on MacOS and Windows (#933)
This commit is contained in:
parent
6cb9d057b3
commit
bcfca39c5d
33
.github/workflows/ci.yml
vendored
33
.github/workflows/ci.yml
vendored
@ -27,9 +27,28 @@ jobs:
|
||||
- "3.12"
|
||||
os:
|
||||
- ubuntu-latest
|
||||
- windows-latest
|
||||
- macos-latest
|
||||
extension:
|
||||
- "skip_cython"
|
||||
- "use_cython"
|
||||
exclude:
|
||||
- python-version: "3.9"
|
||||
os: windows-latest
|
||||
- python-version: "3.10"
|
||||
os: windows-latest
|
||||
- python-version: "3.11"
|
||||
os: windows-latest
|
||||
- python-version: "3.9"
|
||||
os: macos-latest
|
||||
- python-version: "3.10"
|
||||
os: macos-latest
|
||||
- python-version: "3.11"
|
||||
os: macos-latest
|
||||
- extension: "use_cython"
|
||||
os: windows-latest
|
||||
- extension: "use_cython"
|
||||
os: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Python
|
||||
@ -40,6 +59,7 @@ jobs:
|
||||
|
||||
- name: Get pip cache dir
|
||||
id: pip-cache
|
||||
shell: bash
|
||||
run: |
|
||||
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
|
||||
- name: Restore PIP cache
|
||||
@ -53,6 +73,7 @@ jobs:
|
||||
if: ${{ matrix.extension == 'skip_cython' }}
|
||||
env:
|
||||
SKIP_CYTHON: 1
|
||||
shell: bash
|
||||
run: |
|
||||
pip3 install -r requirements.txt -r requirements_test.txt
|
||||
pip3 install -e .
|
||||
@ -60,10 +81,12 @@ jobs:
|
||||
if: ${{ matrix.extension == 'use_cython' }}
|
||||
env:
|
||||
REQUIRE_CYTHON: 1
|
||||
shell: bash
|
||||
run: |
|
||||
pip3 install -r requirements.txt -r requirements_test.txt
|
||||
pip3 install -e .
|
||||
- name: Register problem matchers
|
||||
shell: bash
|
||||
run: |
|
||||
echo "::add-matcher::.github/workflows/matchers/flake8.json"
|
||||
echo "::add-matcher::.github/workflows/matchers/pylint.json"
|
||||
@ -72,16 +95,16 @@ jobs:
|
||||
|
||||
- run: flake8 aioesphomeapi
|
||||
name: Lint with flake8
|
||||
if: ${{ matrix.python-version == '3.12' && matrix.extension == 'skip_cython' }}
|
||||
if: ${{ matrix.python-version == '3.12' && matrix.extension == 'skip_cython' && matrix.os == 'ubuntu-latest' }}
|
||||
- run: pylint aioesphomeapi
|
||||
name: Lint with pylint
|
||||
if: ${{ matrix.python-version == '3.12' && matrix.extension == 'skip_cython' }}
|
||||
if: ${{ matrix.python-version == '3.12' && matrix.extension == 'skip_cython' && matrix.os == 'ubuntu-latest' }}
|
||||
- run: ruff check aioesphomeapi tests
|
||||
name: Check formatting with ruff
|
||||
if: ${{ matrix.python-version == '3.12' && matrix.extension == 'skip_cython' }}
|
||||
if: ${{ matrix.python-version == '3.12' && matrix.extension == 'skip_cython' && matrix.os == 'ubuntu-latest' }}
|
||||
- run: mypy aioesphomeapi
|
||||
name: Check typing with mypy
|
||||
if: ${{ matrix.python-version == '3.12' && matrix.extension == 'skip_cython' }}
|
||||
if: ${{ matrix.python-version == '3.12' && matrix.extension == 'skip_cython' && matrix.os == 'ubuntu-latest' }}
|
||||
- run: pytest -vv --cov=aioesphomeapi --cov-report=xml --tb=native tests
|
||||
name: Run tests with pytest
|
||||
- name: Upload coverage to Codecov
|
||||
@ -98,4 +121,4 @@ jobs:
|
||||
exit 1
|
||||
fi
|
||||
name: Check protobuf files match
|
||||
if: ${{ matrix.python-version == '3.12' && matrix.extension == 'skip_cython' }}
|
||||
if: ${{ matrix.python-version == '3.12' && matrix.extension == 'skip_cython' && matrix.os == 'ubuntu-latest' }}
|
||||
|
Loading…
Reference in New Issue
Block a user