-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: Add Allure Reporting for test results #84
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary by GPT-4
This commit adds a new GitHub Actions workflow file called allure-python-pytest.yml
. This workflow is triggered on pull requests and runs tests using different Python versions (3.8, 3.9, 3.10, and 3.11) with different arguments and flags.
The workflow includes the following steps:
- Checkout the repository.
- Install dependencies (pytest and allure-pytest).
- Login to Azure (only for integration tests).
- Run the tests using the specified Python version, arguments, and flags.
- Get Allure history from the
gh-pages
branch. - Generate an Allure report using the
simple-elf/allure-report-action@master
action. - Deploy the report to GitHub Pages using the
JamesIves/github-pages-deploy-action@v4
action. - Post a comment on the pull request with a link to the test summary.
Additionally, this commit modifies the existing python.yml
workflow by adding similar steps for installing dependencies, running tests with allure-pytest, generating an Allure report, deploying it to GitHub Pages, and posting a comment on the pull request.
The pyproject.toml
file is also updated to remove -n auto
from pytest's addopts configuration.
Finally, a new pytest fixture called log_global_env_facts
is added in tests/conftest.py
. This fixture records Python version information as a test suite property for each test session.
Suggestions
Here are some suggestions for improving the changes in this PR:
-
In the
.github/workflows/allure-python-pytest.yml
file, consider using a more descriptive name for the workflow, such as "Allure Pytest Report". -
In the same file, consider adding a brief comment at the beginning of the file to explain what this workflow does.
-
In both
.github/workflows/allure-python-pytest.yml
and.github/workflows/python.yml
, consider using a specific version ofsimple-elf/allure-report-action
instead of@master
. This can help ensure that your workflow continues to work as expected even if there are breaking changes in future versions of the action. -
In both files, consider adding comments to each step to briefly explain what it does. This can make it easier for others to understand and maintain your workflows.
-
In
pyproject.toml
, consider adding a comment explaining why you removed-n auto
from theaddopts
configuration. -
In
tests/conftest.py
, consider adding a docstring for thelog_global_env_facts
fixture to explain its purpose and how it's used. -
Make sure that all dependencies are up-to-date and compatible with each other.
-
Test your changes thoroughly before merging them into the main branch to ensure that they work as expected and don't introduce any new issues or regressions.
Codecov Report
@@ Coverage Diff @@
## main #84 +/- ##
==========================================
+ Coverage 92.81% 95.60% +2.79%
==========================================
Files 14 14
Lines 501 501
Branches 78 78
==========================================
+ Hits 465 479 +14
+ Misses 27 15 -12
+ Partials 9 7 -2
Flags with carried forward coverage won't be shown. Click here to find out more. |
This PR is the bees knees! |
This PR is the bees knees! |
This PR is the bees knees! |
This PR is the bees knees! |
1 similar comment
This PR is the bees knees! |
<title>Interactive Dropdown Menu</title>
<script>
function showSelected() {
var select = document.getElementById("cars");
var result = select.options[select.selectedIndex].value;
alert(result);
}
</script>
Choose a car:
|
<script> alert("Hello World!"); </script> |
Description
Testing
Additional context