Skip to content

Commit 9fdd693

Browse files
author
serhii.suzanskyi
committed
testing allure generation and upload to github
1 parent 8931a49 commit 9fdd693

1 file changed

Lines changed: 17 additions & 23 deletions

File tree

.github/workflows/test-automation.yml

Lines changed: 17 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -27,33 +27,27 @@ jobs:
2727
pip install --upgrade pip
2828
pip install -r requirements.txt
2929
30-
# - name: Install ChromeDriver
31-
# run: |
32-
# CHROME_VERSION=$(google-chrome --version | cut -d ' ' -f 3 | cut -d '.' -f 1)
33-
# CHROMEDRIVER_VERSION=$(curl -s "https://chromedriver.storage.googleapis.com/LATEST_RELEASE_$CHROME_VERSION")
34-
# curl -L -o chromedriver.zip "https://chromedriver.storage.googleapis.com/${CHROMEDRIVER_VERSION}/chromedriver_linux64.zip"
35-
# unzip chromedriver.zip
36-
# chmod +x chromedriver
37-
# sudo mv chromedriver /usr/local/bin/
38-
# chromedriver --version
39-
40-
# - name: Install ChromeDriver
41-
# run: |
42-
# CHROME_VERSION=$(google-chrome --version | cut -d ' ' -f 3 | cut -d '.' -f 1)
43-
# CHROMEDRIVER_VERSION=$(curl -s "https://chromedriver.storage.googleapis.com/LATEST_RELEASE_$CHROME_VERSION")
44-
# curl -L -o chromedriver.zip "https://chromedriver.storage.googleapis.com/${CHROMEDRIVER_VERSION}/chromedriver_linux64.zip"
45-
# unzip chromedriver.zip
46-
# chmod +x chromedriver
47-
# sudo mv chromedriver /usr/local/bin/
48-
# chromedriver --version
49-
5030
- name: Run Behave Tests
5131
run: |
5232
source .venv/bin/activate
5333
behave || true # Prevent pipeline failure on test failures
5434
55-
- name: Upload Test Report
35+
- name: Install Allure and Generate Report
36+
run: |
37+
sudo apt-add-repository ppa:qameta/allure -y
38+
sudo apt-get update
39+
sudo apt-get install -y allure
40+
allure generate reports/allure-results --clean -o reports/allure-report
41+
42+
- name: Upload Allure Report as Artifact
5643
uses: actions/upload-artifact@v4
5744
with:
58-
name: behave-test-report
59-
path: report.txt
45+
name: allure-report
46+
path: reports/allure-report
47+
48+
- name: Deploy Allure Report to GitHub Pages
49+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
50+
uses: peaceiris/actions-gh-pages@v3
51+
with:
52+
github_token: ${{ secrets.GITHUB_TOKEN }}
53+
publish_dir: reports/allure-report

0 commit comments

Comments
 (0)