Skip to content

Commit

Permalink
Generate package during CI testing; support python 3.11 (#143)
Browse files Browse the repository at this point in the history
* Update pytest.yml

* Grammar

* Publish artifact for inspection

* Fix whitespace

* test 3.11

* Update const.py

* Add notes to README for PR
  • Loading branch information
MatthewFlamm authored Mar 2, 2023
1 parent 9ee3185 commit b1cf0fc
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
23 changes: 21 additions & 2 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,36 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]
python-version: ["3.10", "3.11"]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
- name: Install dependencies generate
run: |
python -m pip install --upgrade pip
pip install -r requirements_generate.txt
- name: execute generate package
run: |
export PYTHONPATH=$PYTHONPATH:$(pwd)
python generate_phacc/generate_phacc.py --regen
- name: list files
run: ls -a
- name: publish artifact
uses: actions/upload-artifact@v2
with:
name: generated-package
path: |
./
!**/*.pyc
!tmp_dir/
!.git/
if-no-files-found: error
- name: Install dependencies test
run: |
pip install -e .
- name: Test with pytest
run: |
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ This repository is set up to be nearly fully automatic.

* Version of home-assistant/core is given in `ha_version`, `pytest_homeassistant_custom_component.const`, and in the README above.
* This package is generated against published releases of homeassistant and updated daily.
* PRs should not include changes to the `pytest_homeassistant_custom_component` files. CI testing will automatically generate the new files.

### Version Strategy
* When changes in extraction are required, there will be a change in the minor version.
Expand Down
3 changes: 2 additions & 1 deletion generate_phacc/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@

files = [
"__init__.py",
"asyncio_legacy.py", # remove when it is not longer needed
"common.py",
"conftest.py",
"ignore_uncaught_exceptions.py",
"components/recorder/common.py",
"syrupy.py",
"typing.py"
"typing.py",
]

# remove requirements for development only, i.e not related to homeassistant tests
Expand Down

0 comments on commit b1cf0fc

Please sign in to comment.