Skip to content

Commit

Permalink
Nowy workflow, cz4
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtaszczyk committed Aug 9, 2024
1 parent 5d2d283 commit 1f9b01a
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/ci-selenium.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Selenium Python CI
#chcemy żeby zaczął się po push'u
on: [push]
jobs:
build:
runs-on: ubuntu-latest

services:
selenium:
image: selenium/standalone-chrome:latest
options: >-
--shm-size 2g
ports:
- 4444:4444
steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Set up Python 3.8
uses: action/setup-python@v4
with:
python-version: '3.8'

- name: Install dependencies
run: |
python -m pip install --upgrade.pip
pip install -r wymagania.txt
- name: Run tests
env:
SELENIUM_REMOTE_URL: http://localhost:4444/wd/hub
run: |
pytest --driver Remote --capability browserName chrome
19 changes: 19 additions & 0 deletions tests/TestExample.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import unittest

from selenium import webdriver


class TestExample(unittest.TestCase):

def setUp(self):
self.driver = webdriver.Chrome()

def test_title(self):
driver = self.driver
driver.get("http://demo-store.seleniumacademy.com/")

def tearDown(self):
self.driver.close()

if __name__ == '__main__':
unittest.main()
1 change: 1 addition & 0 deletions wymagania.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
currencies
pytest
selenium

0 comments on commit 1f9b01a

Please sign in to comment.