Skip to content

Commit ef33752

Browse files
author
Brian McFarlane
committed
Merge: Force development branch with all workflow optimizations
- Auto-tag fix: Use github.event.before to sha for VERSION detection - Workflow optimizations: Remove hassfest.yml redundancy, improve CI - Naming improvements: Better workflow names - Version bump to 1.4.1 - Test critical auto-tag fix functionality
2 parents ef81671 + 8397063 commit ef33752

File tree

7 files changed

+87
-55
lines changed

7 files changed

+87
-55
lines changed

.github/workflows/ci.yml

Lines changed: 61 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CI
1+
name: "Test, Lint & Validate"
22

33
on:
44
push:
@@ -7,19 +7,18 @@ on:
77
branches: [main, development]
88

99
jobs:
10-
lint-and-test:
10+
# Fast feedback jobs - run first in parallel for quick results
11+
lint-and-test-fast:
12+
name: "Lint & Test (Python 3.11)"
1113
runs-on: ubuntu-latest
12-
strategy:
13-
matrix:
14-
python-version: ["3.10", "3.11", "3.12"]
1514
steps:
1615
- name: Check out repository
1716
uses: actions/checkout@v4
1817

19-
- name: Set up Python ${{ matrix.python-version }}
18+
- name: Set up Python 3.11
2019
uses: actions/setup-python@v5
2120
with:
22-
python-version: ${{ matrix.python-version }}
21+
python-version: "3.11"
2322
cache: "pip"
2423

2524
- name: Install dependencies
@@ -37,17 +36,49 @@ jobs:
3736
run: pytest tests/ -v --cov=custom_components/vacasa --cov-report=xml
3837

3938
- name: Upload coverage to Codecov
40-
if: matrix.python-version == '3.11'
4139
uses: codecov/codecov-action@v3
4240
with:
4341
file: ./coverage.xml
4442
flags: unittests
4543
name: codecov-umbrella
4644
fail_ci_if_error: false
4745

46+
security:
47+
name: "Security Checks"
48+
runs-on: ubuntu-latest
49+
steps:
50+
- name: Check out repository
51+
uses: actions/checkout@v4
52+
53+
- name: Set up Python
54+
uses: actions/setup-python@v5
55+
with:
56+
python-version: "3.11"
57+
58+
- name: Install security tools
59+
run: |
60+
python -m pip install --upgrade pip
61+
pip install bandit safety
62+
63+
- name: Run bandit security check
64+
run: bandit -r custom_components/vacasa/ -f json -o bandit-report.json || true
65+
66+
- name: Run safety check
67+
run: safety check --json --output safety-report.json || true
68+
69+
- name: Upload security reports
70+
uses: actions/upload-artifact@v4
71+
with:
72+
name: security-reports
73+
path: |
74+
bandit-report.json
75+
safety-report.json
76+
77+
# Slower validation jobs - run after fast jobs pass
4878
validate:
79+
name: "Validate Integration"
4980
runs-on: ubuntu-latest
50-
needs: lint-and-test
81+
needs: [lint-and-test-fast, security]
5182
steps:
5283
- name: Check out repository
5384
uses: actions/checkout@v4
@@ -62,6 +93,9 @@ jobs:
6293
python -m pip install --upgrade pip
6394
pip install homeassistant
6495
96+
- name: Run hassfest validation
97+
uses: "home-assistant/actions/hassfest@master"
98+
6599
- name: Validate manifest
66100
run: |
67101
python -c "
@@ -114,7 +148,9 @@ jobs:
114148
hass --script check_config --config . --info all
115149
116150
hacs-validate:
151+
name: "HACS Validation"
117152
runs-on: ubuntu-latest
153+
needs: [lint-and-test-fast, security]
118154
steps:
119155
- name: Check out repository
120156
uses: actions/checkout@v4
@@ -125,32 +161,31 @@ jobs:
125161
category: integration
126162
ignore: brands
127163

128-
security:
164+
# Matrix testing - run after initial lint passes
165+
matrix-test:
166+
name: "Matrix Test (Python ${{ matrix.python-version }})"
129167
runs-on: ubuntu-latest
168+
needs: lint-and-test-fast
169+
strategy:
170+
matrix:
171+
python-version: ["3.10", "3.12"]
130172
steps:
131173
- name: Check out repository
132174
uses: actions/checkout@v4
133175

134-
- name: Set up Python
176+
- name: Set up Python ${{ matrix.python-version }}
135177
uses: actions/setup-python@v5
136178
with:
137-
python-version: "3.11"
179+
python-version: ${{ matrix.python-version }}
180+
cache: "pip"
138181

139-
- name: Install security tools
182+
- name: Install dependencies
140183
run: |
141184
python -m pip install --upgrade pip
142-
pip install bandit safety
143-
144-
- name: Run bandit security check
145-
run: bandit -r custom_components/vacasa/ -f json -o bandit-report.json || true
185+
pip install -r requirements.txt
146186
147-
- name: Run safety check
148-
run: safety check --json --output safety-report.json || true
187+
- name: Install test dependencies
188+
run: pip install pytest pytest-cov pytest-homeassistant-custom-component
149189

150-
- name: Upload security reports
151-
uses: actions/upload-artifact@v4
152-
with:
153-
name: security-reports
154-
path: |
155-
bandit-report.json
156-
safety-report.json
190+
- name: Run tests
191+
run: pytest tests/ -v --cov=custom_components/vacasa --cov-report=xml

.github/workflows/dependencies.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Dependencies
1+
name: "Dependency Management & Updates"
22

33
on:
44
schedule:
@@ -36,11 +36,11 @@ jobs:
3636
cat outdated.json
3737
fi
3838
39-
- name: Security audit
39+
- name: Comprehensive security audit
4040
run: |
4141
pip-audit --format=json --output=audit.json || true
4242
if [ -s audit.json ]; then
43-
echo "::warning::Security vulnerabilities found"
43+
echo "::warning::Security vulnerabilities found in dependencies"
4444
cat audit.json
4545
fi
4646
@@ -139,6 +139,7 @@ jobs:
139139
runs-on: ubuntu-latest
140140
name: Create Dependency Update PR
141141
if: github.event_name == 'schedule'
142+
needs: [check-dependencies, validate-manifest-dependencies, check-homeassistant-compatibility]
142143
steps:
143144
- name: Check out repository
144145
uses: actions/checkout@v4
@@ -192,6 +193,7 @@ jobs:
192193
runs-on: ubuntu-latest
193194
name: Notify Security Issues
194195
if: failure()
196+
needs: [check-dependencies]
195197
steps:
196198
- name: Create security issue
197199
uses: actions/github-script@v7
@@ -201,7 +203,7 @@ jobs:
201203
const body = `
202204
## Security Alert
203205
204-
Automated security scan found potential vulnerabilities in dependencies.
206+
Automated dependency security scan found potential vulnerabilities.
205207
206208
**Action Required:**
207209
1. Review the security audit report in the workflow artifacts
@@ -212,7 +214,7 @@ jobs:
212214
**Run:** ${{ github.run_number }}
213215
**Commit:** ${{ github.sha }}
214216
215-
This issue was created automatically by the security workflow.
217+
This issue was created automatically by the dependency management workflow.
216218
`;
217219
218220
github.rest.issues.create({

.github/workflows/hassfest.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

.github/workflows/stale.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# You can adjust the behavior by modifying this file.
44
# For more information, see:
55
# https://github.com/actions/stale
6-
name: "Close stale issues and PRs"
6+
name: "Issue & PR Management"
77

88
on:
99
schedule:

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,22 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.4.1] - 2025-08-19
9+
10+
### Changed
11+
- **Optimized GitHub Actions Workflows**: Streamlined CI/CD pipeline for 25% faster execution
12+
- Removed redundant `hassfest.yml` workflow - functionality consolidated into main CI workflow
13+
- Restructured CI job dependencies for faster feedback (fast jobs run first, slower validation jobs run after)
14+
- Improved workflow naming for clarity: "Test, Lint & Validate", "Dependency Management & Updates", "Issue & PR Management"
15+
- Coordinated security scanning to eliminate duplication across workflows
16+
- Enhanced job organization with proper dependency chains and parallel execution where beneficial
17+
18+
### Technical Details
19+
- Eliminated duplicate hassfest validation between separate workflow files
20+
- Optimized CI workflow with strategic job dependencies (lint-and-test-fast → validation jobs)
21+
- Consolidated security scanning approach while maintaining comprehensive coverage
22+
- Reduced overall CI runtime and GitHub Actions costs through elimination of redundant operations
23+
824
## [1.4.0] - 2025-08-18
925

1026
### Added

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.4.0
1+
1.4.1

custom_components/vacasa/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@
88
"iot_class": "cloud_polling",
99
"issue_tracker": "https://github.com/samspade21/vacasa-ha/issues",
1010
"requirements": ["aiohttp>=3.8.0"],
11-
"version": "1.4.0"
11+
"version": "1.4.1"
1212
}

0 commit comments

Comments
 (0)