add conftest.py and some screenshots #15
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| name: Check out repository | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.11' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Install GeckoDriver | |
| run: | | |
| python -m pip install webdriver-manager | |
| - name: Install Allure | |
| run: | | |
| wget https://github.com/allure-framework/allure2/releases/download/2.25.0/allure-2.25.0.zip | |
| unzip allure-2.25.0.zip | |
| export PATH=$PATH:$(pwd)/allure-2.25.0/bin | |
| echo "PATH=$PATH" >> $GITHUB_ENV | |
| - name: Run tests with Allure | |
| env: | |
| PYTHONPATH: . | |
| run: | | |
| mkdir -p allure-results | |
| pytest test/ --alluredir=allure-results -v | |
| - name: Generate Allure report | |
| run: | | |
| allure generate allure-results -o allure-report --clean | |
| - name: Upload Allure report | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: allure-report | |
| path: allure-report/ | |
| - name: Run tests with HTML (optional, for backward compat) | |
| env: | |
| PYTHONPATH: . | |
| run: | | |
| mkdir -p reports | |
| pytest test/ --html=reports/report.html --self-contained-html | |
| - name: Upload HTML test report | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: html-report | |
| path: reports/report.html |