Skip to content

added ruff for actions #75

added ruff for actions

added ruff for actions #75

Workflow file for this run

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: Cache Python packages
uses: actions/cache@v3
with:
path: |
~/.cache/pip
!~/.cache/pip/wheel
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
- 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: |
set -e
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install --upgrade pytest pytest-html
pip install ruff
- name: Set PYTHONPATH
run: echo "PYTHONPATH=$(pwd)" >> $GITHUB_ENV
- name: Run Linting
run: |
ruff check .
- name: Run tests
run: |
python -m pytest --verbose --maxfail=5 --disable-warnings --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