updated README.md #71
This file contains hidden or 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
name: Selenium Tests on macOS x86_64 | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
test: | |
runs-on: macos-latest | |
env: | |
DEV_URL: ${{ vars.DEV_URL }} | |
STAG_URL: ${{ vars.STAG_URL }} | |
permissions: | |
checks: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: setup Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.10" | |
- name: Install Chrome and WebDriver if not already installed | |
run: | | |
if ! command -v google-chrome &>/dev/null; then | |
echo "Installing Chrome" | |
brew install --cask google-chrome | |
else | |
echo "Chrome is already installed" | |
fi | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
pip install --upgrade pytest pytest-html | |
- name: Run tests | |
run: | | |
python -m pytest --verbose --junit-xml=test-results.xml | |
- name: Publish Test Report | |
uses: mikepenz/action-junit-report@v3 | |
if: success() || failure() # always run even if the previous step fails | |
with: | |
report_paths: '**/test-results.xml' | |
detailed_summary: true | |
include_passed: true |