Skip to content

Commit d039f02

Browse files
author
dmy.berezovskyi
committed
added ruff for actions
1 parent 71731b9 commit d039f02

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

.github/workflows/run_tests.yaml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@ jobs:
2424
with:
2525
python-version: "3.10"
2626

27+
- name: Cache Python packages
28+
uses: actions/cache@v3
29+
with:
30+
path: |
31+
~/.cache/pip
32+
!~/.cache/pip/wheel
33+
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
34+
2735
- name: Install Chrome and WebDriver if not already installed
2836
run: |
2937
if ! command -v google-chrome &>/dev/null; then
@@ -35,23 +43,29 @@ jobs:
3543
3644
- name: Install dependencies
3745
run: |
46+
set -e
3847
python -m pip install --upgrade pip
3948
pip install -r requirements.txt
4049
pip install --upgrade pytest pytest-html
4150
pip install ruff
51+
pip install chromedriver-autoinstaller
52+
python -m chromedriver_autoinstaller
53+
54+
- name: Set PYTHONPATH
55+
run: echo "PYTHONPATH=$(pwd)" >> $GITHUB_ENV
4256

4357
- name: Run Linting
4458
run: |
4559
ruff check .
4660
4761
- name: Run tests
4862
run: |
49-
python -m pytest --verbose --junit-xml=test-results.xml
63+
python -m pytest --verbose --maxfail=5 --disable-warnings --junit-xml=test-results.xml
5064
5165
- name: Publish Test Report
5266
uses: mikepenz/action-junit-report@v3
5367
if: success() || failure() # always run even if the previous step fails
5468
with:
5569
report_paths: '**/test-results.xml'
5670
detailed_summary: true
57-
include_passed: true
71+
include_passed: true

requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,5 @@ cryptography~=43.0.1
1313
beautifulsoup4==4.12.2
1414
requests~=2.31.0
1515
setuptools~=68.2.2
16-
ruff~=0.6.8
16+
ruff~=0.6.8
17+
Appium-Python-Client~=2.7.1

0 commit comments

Comments
 (0)