Skip to content

Commit

Permalink
Simplify folders, automatic testing
Browse files Browse the repository at this point in the history
  • Loading branch information
arc25275 committed May 19, 2024
1 parent 4539b0e commit 7151412
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 84 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,20 @@ jobs:
- name: Install requirements
run: |
pip install -r requirements.txt
- name: Run server
run:
python weather_icons.py
- name: Test with pytest
run: |
pip install pytest pytest-cov
pytest test_requesting.py --doctest-modules --junitxml=junit/test-results.xml --cov=com --cov-report=xml --cov-report=html
- name: Run PyInstaller
run: |
python -m PyInstaller weather_icons.spec
- uses: actions/upload-artifact@v2
with:
name: WeatherIconMachine
path: dist/WeatherIconMachine.exe

- name: create release
id: create_release
uses: actions/create-release@v1
Expand Down
File renamed without changes
74 changes: 37 additions & 37 deletions example_weather.svg → assets/example_weather.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
15 changes: 10 additions & 5 deletions req_weather.py → test_requesting.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,13 @@
}
]

for i in weather_list:
print(i)
socket.send_string(json.dumps(i))
time.sleep(1)
print(socket.recv())

def test_weather():
for i in weather_list:
print(i)
socket.send_string(json.dumps(i))
time.sleep(1)
response = socket.recv()
print(response)
if response != "Invalid Weather":
assert True
41 changes: 0 additions & 41 deletions weather_icons.spec

This file was deleted.

0 comments on commit 7151412

Please sign in to comment.