Add async Websocket client #316
Workflow file for this run
This file contains hidden or 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: Code Standards | |
| on: | |
| push: | |
| paths: | |
| - "**.py" | |
| - "pyproject.toml" | |
| - "poetry.lock" | |
| pull_request: | |
| branches: | |
| - master | |
| - dev | |
| paths: | |
| - "**.py" | |
| - "pyproject.toml" | |
| - "poetry.lock" | |
| workflow_dispatch: | |
| jobs: | |
| code_styling: | |
| name: "Code Styling" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Setup Python | |
| uses: actions/setup-python@v3 | |
| with: | |
| python-version: "3.9" | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| with: | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| - name: Install Dependencies | |
| run: | | |
| pip install poetry | |
| poetry install --with styling | |
| - name: Run Ruff format | |
| run: poetry run ruff format homeassistant_api | |
| - name: Run Ruff linting | |
| run: poetry run ruff check homeassistant_api | |
| - name: Run MyPy | |
| run: poetry run mypy homeassistant_api --show-error-codes | |
| code_functionality: | |
| name: "Code Functionality" | |
| runs-on: ubuntu-latest | |
| environment: "Test Suite" | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| with: | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| - name: Pre Docker Setup | |
| run: | | |
| mkdir volumes/coverage | |
| - name: Run Test Environment | |
| run: | | |
| docker compose up --build --exit-code-from tests | |
| env: | |
| HOMEASSISTANTAPI_TOKEN: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJkMDE4YjQ4YzMyZTE0ODNhYjY2ZWQzOTZmYzg3ZDAyNiIsImlhdCI6MTY3ODU3NDUwMSwiZXhwIjoxOTkzOTM0NTAxfQ.fyhnfwpont4uE0gn46_Ut_pPmyn4QWv0MDaVAei2PPk" # This is non-sensitive data | |
| - name: Post Docker Setup | |
| run: | | |
| sudo chown -R $USER volumes | |
| - name: Upload Coverage Report | |
| uses: codecov/codecov-action@v3 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: ./volumes/coverage/coverage.xml | |
| verbose: true |