This repository was archived by the owner on Jul 28, 2024. It is now read-only.
File tree 16 files changed +558
-56
lines changed
16 files changed +558
-56
lines changed Original file line number Diff line number Diff line change 1
1
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
2
2
version : 2
3
3
updates :
4
- - package-ecosystem : " github-actions"
5
- directory : " / "
4
+ - package-ecosystem : github-actions
5
+ directory : /
6
6
schedule :
7
- interval : " weekly"
7
+ interval : weekly
8
8
9
- - package-ecosystem : " pip"
10
- directory : " / "
9
+ - package-ecosystem : pip
10
+ directory : /
11
11
schedule :
12
- interval : " weekly"
12
+ interval : weekly
13
13
ignore :
14
14
# Dependabot should not update Home Assistant as that should match the homeassistant key in hacs.json
15
- - dependency-name : " homeassistant"
15
+ - dependency-name : homeassistant
Original file line number Diff line number Diff line change 1
- name : " Lint"
1
+ name : Lint
2
2
3
3
on :
4
4
push :
5
- branches :
6
- - " main"
5
+ branches : [ main ]
7
6
pull_request :
8
- branches :
9
- - " main"
7
+ branches : [ main ]
10
8
11
9
jobs :
12
10
ruff :
13
- name : " Ruff"
14
- runs-on : " ubuntu-latest"
11
+ name : Ruff
12
+ runs-on : ubuntu-latest
15
13
steps :
16
- - name : " Checkout the repository"
17
- uses : " actions/checkout@v3.5.2 "
14
+ - name : Checkout the repository
15
+ uses : actions/checkout@v3
18
16
19
- - name : " Set up Python"
20
- uses : actions/setup-python@v4.6.1
17
+ - name : Set up Python
18
+ uses : actions/setup-python@v4
21
19
with :
22
20
python-version : " 3.10"
23
- cache : " pip"
21
+ cache : pip
24
22
25
- - name : " Install requirements"
23
+ - name : Install requirements
26
24
run : python3 -m pip install -r requirements.txt
27
25
28
- - name : " Run"
26
+ - name : Run
29
27
run : python3 -m ruff check .
Original file line number Diff line number Diff line change
1
+ name : Pytest
2
+
3
+ on :
4
+ push :
5
+ branches : [ main ]
6
+ pull_request :
7
+ branches : [ main ]
8
+
9
+ jobs :
10
+ pytest :
11
+ runs-on : ubuntu-latest
12
+ strategy :
13
+ matrix :
14
+ python-version : ["3.10", "3.11"]
15
+
16
+ steps :
17
+ - uses : actions/checkout@v3
18
+ - name : Set up Python ${{ matrix.python-version }}
19
+ uses : actions/setup-python@v4
20
+ with :
21
+ python-version : ${{ matrix.python-version }}
22
+ cache : pip
23
+ - name : Install requirements
24
+ run : pip install -r requirements_test.txt
25
+ - name : Test with pytest
26
+ run : pytest
Original file line number Diff line number Diff line change 1
- name : " Release"
1
+ name : Release
2
2
3
3
on :
4
4
release :
5
5
types :
6
- - " published"
6
+ - published
7
7
8
8
permissions : {}
9
9
10
10
jobs :
11
11
release :
12
- name : " Release"
13
- runs-on : " ubuntu-latest"
12
+ name : Release
13
+ runs-on : ubuntu-latest
14
14
permissions :
15
15
contents : write
16
16
steps :
17
- - name : " Checkout the repository"
18
- uses : " actions/checkout@v3.5.2 "
17
+ - name : Checkout the repository
18
+ uses : actions/checkout@v3
19
19
20
- - name : " Adjust version number"
21
- shell : " bash"
20
+ - name : Adjust version number
21
+ shell : bash
22
22
run : |
23
23
yq -i -o json '.version="${{ github.event.release.tag_name }}"' \
24
24
"${{ github.workspace }}/custom_components/matrix/manifest.json"
25
25
26
- - name : " ZIP the integration directory"
27
- shell : " bash"
26
+ - name : ZIP the integration directory
27
+ shell : bash
28
28
run : |
29
29
cd "${{ github.workspace }}/custom_components/matrix"
30
30
zip matrix-nio-hacs.zip -r ./
31
31
32
- - name : " Upload the ZIP file to the release"
32
+ - name : Upload the ZIP file to the release
33
33
34
34
with :
35
35
files : ${{ github.workspace }}/custom_components/matrix/matrix-nio-hacs.zip
Original file line number Diff line number Diff line change 1
- name : " Validate"
1
+ name : Validate
2
2
3
3
on :
4
4
workflow_dispatch :
5
5
schedule :
6
- - cron : " 0 0 * * *"
6
+ - cron : 0 0 * * *
7
7
push :
8
- branches :
9
- - " main"
8
+ branches : [ main ]
10
9
pull_request :
11
- branches :
12
- - " main"
10
+ branches : [ main ]
13
11
14
12
jobs :
15
13
hassfest : # https://developers.home-assistant.io/blog/2020/04/16/hassfest
16
- name : " Hassfest Validation"
17
- runs-on : " ubuntu-latest"
14
+ name : Hassfest Validation
15
+ runs-on : ubuntu-latest
18
16
steps :
19
- - name : " Checkout the repository"
20
- uses : " actions/checkout@v3.5.2 "
17
+ - name : Checkout the repository
18
+ uses : actions/checkout@v3
21
19
22
- - name : " Run hassfest validation"
23
- uses : " home-assistant/actions/hassfest@master"
20
+ - name : Run hassfest validation
21
+ uses : home-assistant/actions/hassfest@master
24
22
25
23
hacs : # https://github.com/hacs/action
26
- name : " HACS Validation"
27
- runs-on : " ubuntu-latest"
24
+ name : HACS Validation
25
+ runs-on : ubuntu-latest
28
26
steps :
29
- - name : " Checkout the repository"
30
- uses : " actions/checkout@v3.5.2 "
27
+ - name : Checkout the repository
28
+ uses : actions/checkout@v3
31
29
32
- - name : " Run HACS validation"
33
- uses : " hacs/action@main"
30
+ - name : Run HACS validation
31
+ uses : hacs/action@main
34
32
with :
35
- category : " integration"
33
+ category : integration
36
34
# Remove this 'ignore' key when you have added brand images for your integration to https://github.com/home-assistant/brands
37
- ignore : " brands"
35
+ ignore : brands
Original file line number Diff line number Diff line change
1
+ """Custom Components."""
Original file line number Diff line number Diff line change 2
2
"name" : " Matrix Nio" ,
3
3
"filename" : " matrix-nio-hacs.zip" ,
4
4
"hide_default_branch" : true ,
5
- "homeassistant" : " 2023.5.4 " ,
5
+ "homeassistant" : " 2023.6.0 " ,
6
6
"render_readme" : true ,
7
7
"zip_release" : true
8
8
}
Original file line number Diff line number Diff line change
1
+ [tool .pytest .ini_options ]
2
+ testpaths = [" tests" ]
3
+ asyncio_mode = " auto"
Original file line number Diff line number Diff line change 1
1
colorlog == 6.7.0
2
- homeassistant = =2023.5.4
2
+ homeassistant > =2023.5.4
3
3
pip >= 21.0 ,< 23.2
4
- ruff == 0.0.270
4
+ ruff >= 0.0.271
5
5
matrix-nio == 0.20.2
6
- Pillow == 9.5.0
6
+ Pillow == 9.5.0
Original file line number Diff line number Diff line change
1
+ -r requirements.txt
2
+ pytest>=7.3.1
3
+ pytest-homeassistant-custom-component>=0.13.35
Original file line number Diff line number Diff line change
1
+ """Tests for the Matrix component."""
You can’t perform that action at this time.
0 commit comments