mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-29 22:24:26 +00:00 
			
		
		
		
	Proposal: Test yaml for each component (#5398)
* Test for each component. * When possible use commandline substitution. * Add wildcard support. * end file with new line. * Move component tests into subfolder. * Add component test to pipeline. * Remove trailing whitespace. * add restore python step. * Add `. venv/bin/activate` to pipeline. * step `changed-components` needs `common` step. * start `list-components-changed.py` different. * iterate on pipeline stage `list-components`. * Update `checkout` action. * Rename test folder from `tests` to `_test`. * validate file exists. * Move component test folder. * extend list-components to include child components. * File does not end with a newline * Handle empty list-components matrix. * list-components also check for changes in tests folder. * Improve `list-components.py`. * `*` is a forbidden character for filenames on windows. --------- Co-authored-by: Your Name <you@example.com> Co-authored-by: Keith Burzinski <kbx81x@gmail.com>
This commit is contained in:
		
							
								
								
									
										5
									
								
								tests/components/adc/test.esp32-c3.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								tests/components/adc/test.esp32-c3.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,5 @@ | ||||
| sensor: | ||||
|   - platform: adc | ||||
|     id: my_sensor | ||||
|     pin: 4 | ||||
|     attenuation: 11db | ||||
							
								
								
									
										11
									
								
								tests/components/adc/test.esp32-idf.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								tests/components/adc/test.esp32-idf.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,11 @@ | ||||
| sensor: | ||||
|   - platform: adc | ||||
|     pin: A0 | ||||
|     name: Living Room Brightness | ||||
|     update_interval: "1:01" | ||||
|     attenuation: 2.5db | ||||
|     unit_of_measurement: "°C" | ||||
|     icon: "mdi:water-percent" | ||||
|     accuracy_decimals: 5 | ||||
|     setup_priority: -100 | ||||
|     force_update: true | ||||
							
								
								
									
										5
									
								
								tests/components/adc/test.esp32-s2.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								tests/components/adc/test.esp32-s2.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,5 @@ | ||||
| sensor: | ||||
|   - platform: adc | ||||
|     id: my_sensor | ||||
|     pin: 1 | ||||
|     attenuation: 11db | ||||
							
								
								
									
										5
									
								
								tests/components/adc/test.esp32-s3.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								tests/components/adc/test.esp32-s3.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,5 @@ | ||||
| sensor: | ||||
|   - platform: adc | ||||
|     id: my_sensor | ||||
|     pin: 1 | ||||
|     attenuation: 11db | ||||
							
								
								
									
										11
									
								
								tests/components/adc/test.esp32.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								tests/components/adc/test.esp32.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,11 @@ | ||||
| sensor: | ||||
|   - platform: adc | ||||
|     pin: A0 | ||||
|     name: Living Room Brightness | ||||
|     update_interval: "1:01" | ||||
|     attenuation: 2.5db | ||||
|     unit_of_measurement: "°C" | ||||
|     icon: "mdi:water-percent" | ||||
|     accuracy_decimals: 5 | ||||
|     setup_priority: -100 | ||||
|     force_update: true | ||||
							
								
								
									
										4
									
								
								tests/components/adc/test.esp8266.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								tests/components/adc/test.esp8266.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,4 @@ | ||||
| sensor: | ||||
|   - platform: adc | ||||
|     id: my_sensor | ||||
|     pin: VCC | ||||
							
								
								
									
										4
									
								
								tests/components/adc/test.rp2040.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								tests/components/adc/test.rp2040.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,4 @@ | ||||
| sensor: | ||||
|   - platform: adc | ||||
|     pin: VCC | ||||
|     name: VSYS | ||||
		Reference in New Issue
	
	Block a user