-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d5b2168
commit 8e95738
Showing
3 changed files
with
33 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,53 @@ | ||
name: Run tests and publish report | ||
name: Allure Report | ||
|
||
on: [push] | ||
|
||
jobs: | ||
test: | ||
autotests: | ||
name: Run tests and generate Allure Report | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
- name: Set up Python 3.x | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.9' | ||
python-version: '3.x' | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install pytest | ||
- name: Run tests | ||
pip install -r requirements.txt | ||
- name: Check code style | ||
if: always() | ||
run: | | ||
pytest --verbose | ||
flake8 | ||
- name: Load test report history | ||
- name: Run Test | ||
if: always() | ||
run: pytest --alluredir=allure-results | ||
continue-on-error: true | ||
|
||
- name: Get Allure history | ||
uses: actions/checkout@v3 | ||
if: always() | ||
continue-on-error: true | ||
with: | ||
ref: gh-pages | ||
path: gh-pages | ||
|
||
- name: Build test report | ||
- name: Allure Report action from marketplace | ||
uses: simple-elf/[email protected] | ||
if: always() | ||
with: | ||
gh_pages: gh-pages | ||
allure_results: allure-results | ||
allure_history: allure-history | ||
allure_results: build/allure-results | ||
|
||
- name: Publish test report | ||
uses: peaceiris/actions-gh-pages@v3 | ||
- name: Deploy report to Github Pages | ||
if: always() | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_branch: gh-pages | ||
publish_dir: allure-history | ||
uses: peaceiris/actions-gh-pages@v2 | ||
env: | ||
PERSONAL_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
PUBLISH_BRANCH: gh-pages | ||
PUBLISH_DIR: allure-history |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[pytest] | ||
addopts = --allure-link-pattern pr:https://github.com/swetha1654/allure-simple/pull/{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
pytest>=5.0.0 | ||
allure-pytest>=2.8.18 | ||
flake8>=3.8.3 |