Run web API test suite in GitHub Actions#1009
Conversation
031a0b4 to
cb788f6
Compare
|
Note: This should be merged after PR #1010 as the web/frontend_checks paths have been updated to match their new locations in that branch. |
Added Pytest API test suite to GitHub Actions web workflow Refactored Docker infrastructure: - Fixed ignore patterns in .dockerignore - Added healthchecks to backend and web containers - Reduced Docker image sizes Misc: - 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
cb788f6 to
d3eac3d
Compare
| {% if locale.language == env['locale'] %} | ||
| <option value="{{ locale.language }}" selected="selected"> | ||
| {% else %} | ||
| <option value="{{ locale.language }}"> | ||
| {% endif %} |
There was a problem hiding this comment.
I thought about adding this logic while implementing localization, but decided against it at the time. It doesn't hurt though. Maybe you were sick of seeing "Deutsch" being selected all the time? ;)
There was a problem hiding this comment.
Pretty much! I don't think there's anywhere to see the current locale, otherwise?
python/web/src/web.py
Outdated
| # Hardcoded fallback to "en" when the user agent does not send an accept-language header | ||
| language = request.accept_languages.best_match(LANGUAGES) or "en" | ||
| return language | ||
| return session.get("language", request.accept_languages.best_match(LANGUAGES) or "en") |
There was a problem hiding this comment.
Definitely neater logic. Did you test this will vintage browsers? I recall running into corner cases with Netscape 3/4 last year which is when I added the elaborate logic above.
There was a problem hiding this comment.
See updated commit, which restores the log. Will test in Netscape to confirm no regressions.
| except KeyboardInterrupt: | ||
| pass | ||
| else: | ||
| print("Serving rascsi-web...") |
There was a problem hiding this comment.
Why did you remove this? It is marginally helpful to know when the startup sequence has reached the bjoern step.
There was a problem hiding this comment.
Re-added generic message higher up, see latest commit. Suggestions for wording welcome (or feel free to change in a future change set!)
python/web/start.sh
Outdated
| cd src | ||
|
|
||
| if [[ $ARG_DEV_MODE ]]; then | ||
| echo "Starting web UI (auto-reload) ..." |
There was a problem hiding this comment.
"auto-reload" is equivalent to "dev mode", right? Any particular reason for not using the same terminology?
There was a problem hiding this comment.
Auto-reload is certainly a consequence of the dev mode flag. Swapped it back to dev mode for consistency in latest commit.

Added Pytest API test suite to GitHub Actions web workflow.
Example run:
Changes
Refactored Docker infrastructure:
Misc: