Fixed typos and adjusted for uniformity #285
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: Pull actions | |
on: | |
pull_request: | |
jobs: | |
validate: | |
runs-on: "ubuntu-latest" | |
name: Validate | |
steps: | |
- uses: "actions/checkout@v4" | |
- name: HACS validation | |
uses: "hacs/action@main" | |
with: | |
category: "integration" | |
ignore: brands | |
- name: Hassfest validation | |
uses: "home-assistant/actions/hassfest@master" | |
style: | |
runs-on: "ubuntu-latest" | |
name: Check style formatting | |
steps: | |
- uses: "actions/checkout@v4" | |
- uses: "actions/setup-python@v5" | |
with: | |
python-version: "3.x" | |
- run: python3 -m pip install black | |
- run: black . | |
tests: | |
runs-on: "ubuntu-latest" | |
strategy: | |
matrix: | |
python-version: ["3.11", "3.12"] | |
include: | |
- python-version: "3.11" | |
requirements: "requirements_test311.txt" | |
- python-version: "3.12" | |
requirements: "requirements_test312.txt" | |
name: Run tests | |
steps: | |
- name: Check out code from GitHub | |
uses: "actions/checkout@v4" | |
- name: Setup Python | |
uses: "actions/setup-python@v5" | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install requirements | |
run: python3 -m pip install -r ${{ matrix.requirements }} | |
- name: Run tests | |
run: | | |
pytest \ | |
-qq \ | |
--timeout=45 \ | |
--durations=10 \ | |
-n auto \ | |
--asyncio-mode=auto \ | |
--cov-report=xml \ | |
--cov-report=term \ | |
--cov custom_components.ev_smart_charging \ | |
-o console_output_style=count \ | |
-p no:sugar \ | |
tests | |
- name: "Upload coverage to Codecov" | |
if: ${{ matrix.python-version == '3.12' }} | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
fail_ci_if_error: true |