Run web API test suite in GitHub Actions (#1009)

- Fixed ignore patterns in .dockerignore
- Added healthchecks to backend and web containers
- Reduced Docker image sizes
- Removed RaSCSI references in various areas (e.g. rascsi -> backend)
- Added compilation-only step to easyinstall.sh
- Moved apt package lists to variables
- Revert to triggering GitHub Actions runs on push
- Updated web/frontend_checks workflow to run black and flake8 against all Python sources
- Capture log files from backend/web containers
- Fix None to float conversion bug when user agent is absent or unrecognised
This commit is contained in:
nucleogenic
2022-12-04 14:31:57 +00:00
committed by GitHub
parent eca8145311
commit 88ff542aeb
30 changed files with 462 additions and 227 deletions

View File

@@ -324,10 +324,17 @@ def browser_supports_modern_themes():
]
current_ua_family = user_agent["user_agent"]["family"]
current_ua_version = float(user_agent["user_agent"]["major"])
current_ua_version = user_agent["user_agent"]["major"]
logging.info(f"Identified browser as family={current_ua_family}, version={current_ua_version}")
# Supported browsers cannot be identified without a version
if not current_ua_version:
return False
for supported_browser, supported_version in supported_browsers:
if current_ua_family == supported_browser and current_ua_version >= supported_version:
if (
current_ua_family == supported_browser
and float(current_ua_version) >= supported_version
):
return True
return False