Skip to content

Commit

Permalink
publish to gibhun-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
root authored and root committed Oct 22, 2024
1 parent e4a0045 commit 5f34f2f
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 22 deletions.
17 changes: 7 additions & 10 deletions .github/workflows/tests_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,21 +163,18 @@ jobs:
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: .
destination_branch: ${{ env.DESTINATION_BRANCH }}
destination_branch: gh-pages-dev

- name: Check contents of gh-pages
run: ls -la
run: |
git fetch origin gh-pages-dev
git checkout gh-pages-dev
ls -la # List the contents to verify the deployment
- name: Get GitHub Pages URL
id: pages-url
uses: actions/github-script@v7
with:
script: |
const repo = context.repo.repo;
const owner = context.repo.owner;
const branchName = context.ref.split('/').pop(); // Use the branch name you want to reference
const pagesUrl = `https://${owner}.github.io/${repo}/gh-pages-${branchName}`; // Use backticks for template literals
core.setOutput('pages_url', pagesUrl);
run: |
echo "GitHub Pages URL: https://${{ github.repository_owner }}.github.io/${{github.event.repository.name }}/gh-pages-dev/"
- name: Output GitHub Pages URL
run: |
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
__pycache__/
screenshots/
.env
*.png
venv/
.venv/
allure-results/
Expand Down
10 changes: 0 additions & 10 deletions init_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,6 @@ def attach_screenshot(filename):
directory = os.path.join(working_dir, 'data', 'attachments')
full_path = os.path.join(directory, filename)

logging.debug(f"Saving screenshot to: {full_path}")
logging.debug(f"Working directory is: {working_dir}")
logging.debug(f"directory is: {directory}")

# Ensure the directory exists
try:
# Check if directory exists, create it if not
Expand All @@ -110,18 +106,12 @@ def attach_screenshot(filename):

# Capture the screenshot
logging.debug(f"Saving screenshot to: {full_path}")
logging.debug(f"Working directory is: {working_dir}")
screenshot = capture_screenshot(full_path)

# Check if screenshot was captured and file exists
if screenshot and os.path.exists(full_path):
logging.debug(f"Screenshot saved successfully at: {full_path}")
logging.debug(f"Saving screenshot to: {full_path}")
logging.debug(f"Working directory is: {working_dir}")
allure.attach.file(full_path, name=filename, attachment_type=allure.attachment_type.PNG)
logging.debug(f"Screenshot attached at: {full_path}")
logging.debug(f"Saving attachment to: {full_path}")
logging.debug(f"Working directory is: {working_dir}")
else:
logging.error(f"Screenshot capture failed or file not found at: {full_path}")
except Exception as e:
Expand Down
13 changes: 11 additions & 2 deletions tests/test_find_a_patient_steps.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import warnings
from pytest_bdd import given, when, then, scenario, scenarios
from pytest_bdd.parsers import parse
from pages.vaccinator_location_page import *
Expand All @@ -10,13 +11,21 @@
from faker import Faker
import random

fake = Faker('en_GB')
warnings.filterwarnings("ignore", category=UserWarning, module='faker')



features_directory = get_working_directory() + "features"

logging.basicConfig(level=logging.INFO)
logging.basicConfig(level=logging.CRITICAL)
logger = logging.getLogger(__name__)

logging.getLogger('faker').setLevel(logging.CRITICAL)
logging.getLogger('faker.factory').setLevel(logging.CRITICAL)
logging.getLogger('faker.providers').setLevel(logging.CRITICAL)

fake = Faker('en_GB')

@pytest.fixture(scope='function')
def shared_data():
return {}
Expand Down

0 comments on commit 5f34f2f

Please sign in to comment.