Skip to content

Commit

Permalink
Update PATH with the virt env bin directory, so that it is propagated…
Browse files Browse the repository at this point in the history
… to subsequent steps.
  • Loading branch information
Ayima Okeyeva committed Jan 13, 2025
1 parent 10aa7bf commit 8b26b5a
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions .github/workflows/selenium-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,25 @@ jobs:
# On Windows use `venv\Scripts\activate`
# On Linux/macOS use `source venv/bin/activate`
source venv/bin/activate
echo PATH=$PATH >> $GITHUB_ENV
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest-html
- name: Debug environment variables
run: echo $PATH

- name: Install required dependencies
run: |
sudo apt-get update
sudo apt-get upgrade
# - name: Set up Chrome and ChromeDriver
# uses: browser-actions/setup-chrome@v1
# with:
# chrome-version: 120
# install-chromedriver: true
# install-dependencies: true
# Set up Firefox and GeckoDriver
# Install Chrome (needed for Chrome tests)
- name: Install Chrome
run: |
sudo apt-get install -y google-chrome-stable
# Set up Firefox and GeckoDriver
- name: Set up Firefox and GeckoDriver
uses: browser-actions/setup-firefox@v1
with:
Expand Down Expand Up @@ -80,7 +83,7 @@ jobs:
env:
BASE_URL: ${{ vars.PRODUCTION_URL }}
run: |
source venv/bin/activate # Activate the virtual environment
# source venv/bin/activate # Activate the virtual environment
pytest --env=production --env_url=${{ vars.PRODUCTION_URL }} tests/test_login.py -sv --headless \
--html=latest_logs/report_production_${{ matrix.browser }}.html \
--self-contained-html --browser-name=${{ matrix.browser }}
Expand Down Expand Up @@ -109,7 +112,7 @@ jobs:
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
run: |
source venv/bin/activate # Activate the virtual environment
# source venv/bin/activate # Activate the virtual environment
pytest --env=sauce-labs --env_url=${{ vars.SAUCE_LABS_URL }} tests/test_login.py -sv --headless \
--html=latest_logs/report_sauce_labs_${{ matrix.browser }}.html \
--self-contained-html --sauce-labs --browser-name=${{ matrix.browser }}
Expand All @@ -135,7 +138,7 @@ jobs:
env:
BASE_URL: ${{ vars.STAGING_URL }}
run: |
source venv/bin/activate # Activate the virtual environment
# source venv/bin/activate # Activate the virtual environment
pytest --env=staging --env_url=${{ vars.STAGING_URL }} tests/test_login.py -sv --headless \
--html=latest_logs/report_staging_${{ matrix.browser }}.html \
--self-contained-html --browser-name=${{ matrix.browser }}
Expand Down

0 comments on commit 8b26b5a

Please sign in to comment.