From 8723bb27faa957f5ea69818d36a124c7fb3329c7 Mon Sep 17 00:00:00 2001 From: Andrii Rubchuk Date: Wed, 4 Jun 2025 13:48:51 +0300 Subject: [PATCH 01/22] ci setup --- .github/workflows/ci.yml | 2 +- .github/workflows/tests.yml | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 96c6ce7..0091fd7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: '3.11' # use your Python version + python-version: '3.11' - name: Install dependencies run: | diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..dc352ad --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,20 @@ +on: + workflow_dispatch: + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.11' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + pip install playwright + playwright install + - name: Run tests + run: pytest --maxfail=1 --disable-warnings -q \ No newline at end of file From 57ea4f5094e0ca01801d151d523099fc6623bcde Mon Sep 17 00:00:00 2001 From: Andrii Rubchuk Date: Wed, 4 Jun 2025 14:17:10 +0300 Subject: [PATCH 02/22] ci setup --- .github/workflows/tests.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index dc352ad..35964a2 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,5 +1,12 @@ +name: Test Run + on: workflow_dispatch: + inputs: + test_class: + description: 'Test class or file to run (e.g., tests/test_example.py::TestClassName)' + required: false + default: '' jobs: test: @@ -17,4 +24,9 @@ jobs: pip install playwright playwright install - name: Run tests - run: pytest --maxfail=1 --disable-warnings -q \ No newline at end of file + run: | + if [ -z "${{ github.event.inputs.test_class }}" ]; then + pytest --maxfail=1 --disable-warnings -q + else + pytest ${{ github.event.inputs.test_class }} --maxfail=1 --disable-warnings -q + fi \ No newline at end of file From 48baaa1f185a0cccc8132d34890eeed835269065 Mon Sep 17 00:00:00 2001 From: Andrii Rubchuk Date: Wed, 4 Jun 2025 14:26:04 +0300 Subject: [PATCH 03/22] ci setup --- .github/workflows/tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 35964a2..ee54434 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -21,6 +21,7 @@ jobs: run: | python -m pip install --upgrade pip pip install -r requirements.txt + pip install pytest-sugar pip install playwright playwright install - name: Run tests From d2f81c633af7b718b8372a7457c2ca87dd08b0a3 Mon Sep 17 00:00:00 2001 From: Andrii Rubchuk Date: Wed, 4 Jun 2025 14:33:57 +0300 Subject: [PATCH 04/22] ci setup --- .github/workflows/ci.yml | 6 +++--- .github/workflows/tests.yml | 12 +++++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0091fd7..59da8de 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,6 +26,6 @@ jobs: pip install playwright playwright install - - name: Run tests - run: | - pytest --maxfail=1 --disable-warnings -q \ No newline at end of file + #- name: Run tests + #run: | + #pytest --maxfail=1 --disable-warnings -q \ No newline at end of file diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ee54434..09c12f7 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -22,12 +22,18 @@ jobs: python -m pip install --upgrade pip pip install -r requirements.txt pip install pytest-sugar + pip install pytest-html pip install playwright playwright install - name: Run tests run: | if [ -z "${{ github.event.inputs.test_class }}" ]; then - pytest --maxfail=1 --disable-warnings -q + pytest --maxfail=1 --disable-warnings -q --html=report.html --self-contained-html else - pytest ${{ github.event.inputs.test_class }} --maxfail=1 --disable-warnings -q - fi \ No newline at end of file + pytest ${{ github.event.inputs.test_class }} --maxfail=1 --disable-warnings -q --html=report.html --self-contained-html + fi + - name: Upload test report + uses: actions/upload-artifact@v3 + with: + name: test-report + path: report.html From 01c04b7e1039f79ba0d73027faf839bd226cb0c7 Mon Sep 17 00:00:00 2001 From: Andrii Rubchuk Date: Wed, 4 Jun 2025 14:36:44 +0300 Subject: [PATCH 05/22] ci setup --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 09c12f7..0310fe8 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -33,7 +33,7 @@ jobs: pytest ${{ github.event.inputs.test_class }} --maxfail=1 --disable-warnings -q --html=report.html --self-contained-html fi - name: Upload test report - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v2 with: name: test-report path: report.html From 509e18c15c6540fc0c14d80c07028076bc77ef4d Mon Sep 17 00:00:00 2001 From: Andrii Rubchuk Date: Wed, 4 Jun 2025 14:43:31 +0300 Subject: [PATCH 06/22] ci setup --- .github/workflows/tests.yml | 26 ++++++++++++++------------ run.sh | 6 ++++-- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0310fe8..de82977 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -21,19 +21,21 @@ jobs: run: | python -m pip install --upgrade pip pip install -r requirements.txt - pip install pytest-sugar - pip install pytest-html + pip install allure-pytest pip install playwright playwright install - - name: Run tests + + - name: Install Allure CLI run: | - if [ -z "${{ github.event.inputs.test_class }}" ]; then - pytest --maxfail=1 --disable-warnings -q --html=report.html --self-contained-html - else - pytest ${{ github.event.inputs.test_class }} --maxfail=1 --disable-warnings -q --html=report.html --self-contained-html - fi - - name: Upload test report - uses: actions/upload-artifact@v2 + wget -qO- https://github.com/allure-framework/allure2/releases/latest/download/allure-2.21.0.zip > allure.zip + unzip allure.zip -d allure + sudo ln -s $PWD/allure/bin/allure /usr/bin/allure + + - name: Run tests and generate Allure report + run: ./your-test-script.sh + + - name: Upload Allure Report + uses: actions/upload-artifact@v3 with: - name: test-report - path: report.html + name: allure-report + path: allure-report diff --git a/run.sh b/run.sh index 26ba802..088dc2e 100644 --- a/run.sh +++ b/run.sh @@ -2,7 +2,7 @@ DEBUG=${DEBUG:-0} ALLURE=${ALLURE:-1} -rm -rf allure-results +rm -rf allure-results allure-report if [ "$DEBUG" -eq 1 ]; then export PWDEBUG=1 @@ -12,5 +12,7 @@ python -m pytest --alluredir=allure-results "$@" if [ "$ALLURE" -eq 1 ]; then allure generate allure-results -o allure-report --clean - allure open allure-report + if [ -z "$CI" ]; then + allure open allure-report + fi fi \ No newline at end of file From e840f5cd735afde6c7ec69852d882a1c7e5954e0 Mon Sep 17 00:00:00 2001 From: Andrii Rubchuk Date: Wed, 4 Jun 2025 15:03:39 +0300 Subject: [PATCH 07/22] ci setup --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index de82977..a737bcf 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -35,7 +35,7 @@ jobs: run: ./your-test-script.sh - name: Upload Allure Report - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: allure-report path: allure-report From 5c93d960512fe64040f5bedcdac1144056b8bcae Mon Sep 17 00:00:00 2001 From: Andrii Rubchuk Date: Wed, 4 Jun 2025 15:07:42 +0300 Subject: [PATCH 08/22] ci setup --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a737bcf..aa63c09 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -27,9 +27,9 @@ jobs: - name: Install Allure CLI run: | - wget -qO- https://github.com/allure-framework/allure2/releases/latest/download/allure-2.21.0.zip > allure.zip + wget -q https://github.com/allure-framework/allure2/releases/latest/download/allure-2.21.0.zip -O allure.zip unzip allure.zip -d allure - sudo ln -s $PWD/allure/bin/allure /usr/bin/allure + sudo ln -s $PWD/allure/bin/allure /usr/bin/allu - name: Run tests and generate Allure report run: ./your-test-script.sh From 0a20be311797115ae581c9fff16b3fd8f2d88cdd Mon Sep 17 00:00:00 2001 From: Andrii Rubchuk Date: Wed, 4 Jun 2025 15:11:31 +0300 Subject: [PATCH 09/22] ci setup --- .github/workflows/tests.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index aa63c09..50cd58b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -27,9 +27,12 @@ jobs: - name: Install Allure CLI run: | - wget -q https://github.com/allure-framework/allure2/releases/latest/download/allure-2.21.0.zip -O allure.zip + wget -q https://github.com/allure-framework/allure2/releases/download/2.21.0/allure-2.21.0.zip -O allure.zip + ls -l allure.zip + file allure.zip + head -20 allure.zip unzip allure.zip -d allure - sudo ln -s $PWD/allure/bin/allure /usr/bin/allu + sudo ln -s $PWD/allure/bin/allure /usr/bin/allure - name: Run tests and generate Allure report run: ./your-test-script.sh From 89ec3294ee44a14dc90bb17798ee6defd0639c2e Mon Sep 17 00:00:00 2001 From: Andrii Rubchuk Date: Wed, 4 Jun 2025 15:28:42 +0300 Subject: [PATCH 10/22] ci setup --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 50cd58b..ec6bacc 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -35,7 +35,7 @@ jobs: sudo ln -s $PWD/allure/bin/allure /usr/bin/allure - name: Run tests and generate Allure report - run: ./your-test-script.sh + run: ./run.sh - name: Upload Allure Report uses: actions/upload-artifact@v4 From 0895b894d3b052c7472b18b3e0a33aa636d65b38 Mon Sep 17 00:00:00 2001 From: Andrii Rubchuk Date: Wed, 4 Jun 2025 15:32:36 +0300 Subject: [PATCH 11/22] ci setup --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ec6bacc..2d61d34 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -35,7 +35,7 @@ jobs: sudo ln -s $PWD/allure/bin/allure /usr/bin/allure - name: Run tests and generate Allure report - run: ./run.sh + run: bash ./run.sh - name: Upload Allure Report uses: actions/upload-artifact@v4 From 735ec6397c00afd32f7ed5624f36443cc7806350 Mon Sep 17 00:00:00 2001 From: Andrii Rubchuk Date: Wed, 4 Jun 2025 15:36:18 +0300 Subject: [PATCH 12/22] ci setup --- .github/workflows/tests.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2d61d34..3d8d367 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -36,6 +36,8 @@ jobs: - name: Run tests and generate Allure report run: bash ./run.sh + env: + ALLURE: 1 - name: Upload Allure Report uses: actions/upload-artifact@v4 From c5ef85dd10b2de59e1d1a2f8d2a77a57064d94e4 Mon Sep 17 00:00:00 2001 From: Andrii Rubchuk Date: Wed, 4 Jun 2025 15:42:11 +0300 Subject: [PATCH 13/22] ci setup --- .github/workflows/tests.yml | 5 +++++ run.sh | 3 --- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3d8d367..1152827 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -39,6 +39,11 @@ jobs: env: ALLURE: 1 + - name: Check Allure Report Directory + run: | + echo "Listing contents of allure-report" + ls -la allure-report || echo "Directory not found" + - name: Upload Allure Report uses: actions/upload-artifact@v4 with: diff --git a/run.sh b/run.sh index 088dc2e..b636063 100644 --- a/run.sh +++ b/run.sh @@ -12,7 +12,4 @@ python -m pytest --alluredir=allure-results "$@" if [ "$ALLURE" -eq 1 ]; then allure generate allure-results -o allure-report --clean - if [ -z "$CI" ]; then - allure open allure-report - fi fi \ No newline at end of file From 7096054700909b1891724e85978e7ed7b2848442 Mon Sep 17 00:00:00 2001 From: Andrii Rubchuk Date: Wed, 4 Jun 2025 15:45:50 +0300 Subject: [PATCH 14/22] ci setup --- .github/workflows/tests.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1152827..b64c9e7 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -28,11 +28,8 @@ jobs: - name: Install Allure CLI run: | wget -q https://github.com/allure-framework/allure2/releases/download/2.21.0/allure-2.21.0.zip -O allure.zip - ls -l allure.zip - file allure.zip - head -20 allure.zip unzip allure.zip -d allure - sudo ln -s $PWD/allure/bin/allure /usr/bin/allure + echo "$PWD/allure/allure-2.21.0/bin" >> $GITHUB_PATH - name: Run tests and generate Allure report run: bash ./run.sh From 6b78e2944f5750fd63ad42c93f36b460fe9e9b5f Mon Sep 17 00:00:00 2001 From: Andrii Rubchuk Date: Wed, 4 Jun 2025 15:53:58 +0300 Subject: [PATCH 15/22] ci setup --- .github/workflows/tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b64c9e7..601c79f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -30,6 +30,7 @@ jobs: wget -q https://github.com/allure-framework/allure2/releases/download/2.21.0/allure-2.21.0.zip -O allure.zip unzip allure.zip -d allure echo "$PWD/allure/allure-2.21.0/bin" >> $GITHUB_PATH + chmod +x allure/allure-2.21.0/bin/allure - name: Run tests and generate Allure report run: bash ./run.sh From 44f97381f53980cd711b283916a79fd068c4abae Mon Sep 17 00:00:00 2001 From: Andrii Rubchuk Date: Wed, 4 Jun 2025 16:05:57 +0300 Subject: [PATCH 16/22] ci setup --- .github/workflows/tests.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 601c79f..0b5bec1 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -13,10 +13,12 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + - name: Set up Python uses: actions/setup-python@v4 with: python-version: '3.11' + - name: Install dependencies run: | python -m pip install --upgrade pip @@ -37,11 +39,16 @@ jobs: env: ALLURE: 1 - - name: Check Allure Report Directory + - name: Check Allure Report Directory (short listing) run: | - echo "Listing contents of allure-report" + echo "Listing contents of allure-report:" ls -la allure-report || echo "Directory not found" + - name: Check Allure Report Directory (recursive listing) + run: | + echo "Recursive listing of allure-report:" + find allure-report + - name: Upload Allure Report uses: actions/upload-artifact@v4 with: From 002d6b9004764868c0755136dd07d72161244979 Mon Sep 17 00:00:00 2001 From: Andrii Rubchuk Date: Wed, 4 Jun 2025 16:11:43 +0300 Subject: [PATCH 17/22] ci setup --- run.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/run.sh b/run.sh index b636063..26ba802 100644 --- a/run.sh +++ b/run.sh @@ -2,7 +2,7 @@ DEBUG=${DEBUG:-0} ALLURE=${ALLURE:-1} -rm -rf allure-results allure-report +rm -rf allure-results if [ "$DEBUG" -eq 1 ]; then export PWDEBUG=1 @@ -12,4 +12,5 @@ python -m pytest --alluredir=allure-results "$@" if [ "$ALLURE" -eq 1 ]; then allure generate allure-results -o allure-report --clean + allure open allure-report fi \ No newline at end of file From 26995beb3647f90b493a98e63ff7cc7dee9b1dbe Mon Sep 17 00:00:00 2001 From: Andrii Rubchuk Date: Wed, 4 Jun 2025 16:15:09 +0300 Subject: [PATCH 18/22] ci setup --- run.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/run.sh b/run.sh index 26ba802..088dc2e 100644 --- a/run.sh +++ b/run.sh @@ -2,7 +2,7 @@ DEBUG=${DEBUG:-0} ALLURE=${ALLURE:-1} -rm -rf allure-results +rm -rf allure-results allure-report if [ "$DEBUG" -eq 1 ]; then export PWDEBUG=1 @@ -12,5 +12,7 @@ python -m pytest --alluredir=allure-results "$@" if [ "$ALLURE" -eq 1 ]; then allure generate allure-results -o allure-report --clean - allure open allure-report + if [ -z "$CI" ]; then + allure open allure-report + fi fi \ No newline at end of file From 1465a753088be45ce72610a9a783de21e184aca0 Mon Sep 17 00:00:00 2001 From: Andrii Rubchuk Date: Wed, 4 Jun 2025 16:22:30 +0300 Subject: [PATCH 19/22] ci setup --- .github/workflows/tests.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0b5bec1..2557b53 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -49,6 +49,11 @@ jobs: echo "Recursive listing of allure-report:" find allure-report + - name: Archive Allure Report + run: | + echo "Zipping Allure report directory for artifact upload" + zip -r allure-report.zip allure-report + - name: Upload Allure Report uses: actions/upload-artifact@v4 with: From 0d8f04f53ef0979fb71f263f4422dec57e3923a6 Mon Sep 17 00:00:00 2001 From: Andrii Rubchuk Date: Wed, 4 Jun 2025 16:30:23 +0300 Subject: [PATCH 20/22] ci setup --- .github/workflows/tests.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2557b53..3715fa4 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -39,6 +39,9 @@ jobs: env: ALLURE: 1 + - name: Wait for report to be fully generated + run: sleep 20 + - name: Check Allure Report Directory (short listing) run: | echo "Listing contents of allure-report:" From 085312cbf9a57e53d9a91deaf54eeb95666856b9 Mon Sep 17 00:00:00 2001 From: Andrii Rubchuk Date: Wed, 4 Jun 2025 16:38:39 +0300 Subject: [PATCH 21/22] ci setup --- .github/workflows/tests.yml | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3715fa4..aaf587e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -42,23 +42,8 @@ jobs: - name: Wait for report to be fully generated run: sleep 20 - - name: Check Allure Report Directory (short listing) - run: | - echo "Listing contents of allure-report:" - ls -la allure-report || echo "Directory not found" - - - name: Check Allure Report Directory (recursive listing) - run: | - echo "Recursive listing of allure-report:" - find allure-report - - - name: Archive Allure Report - run: | - echo "Zipping Allure report directory for artifact upload" - zip -r allure-report.zip allure-report - - - name: Upload Allure Report - uses: actions/upload-artifact@v4 + - name: Deploy Allure Report to GitHub Pages # <-- added this block here + uses: peaceiris/actions-gh-pages@v3 with: - name: allure-report - path: allure-report + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./allure-report From e9408e5f75d0dfc5e61712fcf39937381871b7bb Mon Sep 17 00:00:00 2001 From: Andrii Rubchuk Date: Thu, 5 Jun 2025 11:35:06 +0300 Subject: [PATCH 22/22] ci setup --- .github/workflows/tests.yml | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index aaf587e..eaae2b1 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -27,23 +27,6 @@ jobs: pip install playwright playwright install - - name: Install Allure CLI - run: | - wget -q https://github.com/allure-framework/allure2/releases/download/2.21.0/allure-2.21.0.zip -O allure.zip - unzip allure.zip -d allure - echo "$PWD/allure/allure-2.21.0/bin" >> $GITHUB_PATH - chmod +x allure/allure-2.21.0/bin/allure - - - name: Run tests and generate Allure report + - name: Run tests run: bash ./run.sh - env: - ALLURE: 1 - - name: Wait for report to be fully generated - run: sleep 20 - - - name: Deploy Allure Report to GitHub Pages # <-- added this block here - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./allure-report