Skip to content
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

Open
wants to merge 31 commits into
base: main
Choose a base branch
from

Conversation

dciborow
Copy link
Collaborator

Description

Testing

Additional context

@dciborow dciborow changed the title Create allure-python-pytest.yml ci: Add Allure Reporting for test results May 13, 2023
Copy link
Contributor

@github-actions github-actions bot left a 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:

  1. Checkout the repository.
  2. Install dependencies (pytest and allure-pytest).
  3. Login to Azure (only for integration tests).
  4. Run the tests using the specified Python version, arguments, and flags.
  5. Get Allure history from the gh-pages branch.
  6. Generate an Allure report using the simple-elf/allure-report-action@master action.
  7. Deploy the report to GitHub Pages using the JamesIves/github-pages-deploy-action@v4 action.
  8. 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:

  1. In the .github/workflows/allure-python-pytest.yml file, consider using a more descriptive name for the workflow, such as "Allure Pytest Report".

  2. In the same file, consider adding a brief comment at the beginning of the file to explain what this workflow does.

  3. In both .github/workflows/allure-python-pytest.yml and .github/workflows/python.yml, consider using a specific version of simple-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.

  4. 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.

  5. In pyproject.toml, consider adding a comment explaining why you removed -n auto from the addopts configuration.

  6. In tests/conftest.py, consider adding a docstring for the log_global_env_facts fixture to explain its purpose and how it's used.

  7. Make sure that all dependencies are up-to-date and compatible with each other.

  8. 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-commenter
Copy link

codecov-commenter commented May 13, 2023

Codecov Report

Merging #84 (ce79c71) into main (b2fbd84) will increase coverage by 2.79%.
The diff coverage is n/a.

@@            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     
Flag Coverage Δ
integration-3.11 94.61% <ø> (?)
unittests-3.10 92.41% <ø> (ø)
unittests-3.11 92.41% <ø> (ø)
unittests-3.8 92.41% <ø> (ø)
unittests-3.9 92.41% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

see 3 files with indirect coverage changes

@github-actions
Copy link
Contributor

This PR is the bees knees!

@github-actions
Copy link
Contributor

This PR is the bees knees!

@github-actions
Copy link
Contributor

This PR is the bees knees!

@github-actions
Copy link
Contributor

This PR is the bees knees!

1 similar comment
@github-actions
Copy link
Contributor

This PR is the bees knees!

@github-actions
Copy link
Contributor

@github-actions
Copy link
Contributor

@github-actions
Copy link
Contributor

@github-actions
Copy link
Contributor

@github-actions
Copy link
Contributor

@github-actions
Copy link
Contributor

@github-actions
Copy link
Contributor

@github-actions
Copy link
Contributor

@github-actions
Copy link
Contributor

@github-actions
Copy link
Contributor

@github-actions
Copy link
Contributor

@dciborow
Copy link
Collaborator Author

dciborow commented May 17, 2023

<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:
<select name="cars" id="cars" onchange="showSelected()">
  <option value="volvo">Volvo</option>
  <option value="saab">Saab</option>
  <option value="opel">Opel</option>
  <option value="audi">Audi</option>
</select>

@dciborow
Copy link
Collaborator Author

<script> alert("Hello World!"); </script>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants