API Tests Daily #190
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: API Tests Daily | |
| on: | |
| schedule: | |
| - cron: '0 0 * * *' # Запуск каждый день в 00:00 UTC | |
| workflow_dispatch: | |
| inputs: | |
| test_type: | |
| description: 'Which tests to run? (All, API, Tools)' | |
| required: false | |
| default: 'All' | |
| type: choice | |
| options: | |
| - All | |
| - API | |
| - Tools | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Set Up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.13' | |
| - name: Install Dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Install Firefox Dependencies | |
| run: | | |
| sudo apt update | |
| sudo apt install -y libgtk-3-0 libx11-xcb1 | |
| - name: Fetch browsers via Camoufox | |
| run: camoufox fetch | |
| # Run Tools Tests if selected (All or Tools) or on schedule | |
| - name: Run Tools Tests | |
| if: ${{ github.event_name == 'schedule' || github.event.inputs.test_type == 'All' || github.event.inputs.test_type == 'Tools' }} | |
| run: pytest tests/tools_tests.py --log-cli-level=DEBUG | |
| # Run API Tests if selected (All or API) or on schedule | |
| - name: Run API Tests | |
| if: ${{ github.event_name == 'schedule' || github.event.inputs.test_type == 'All' || github.event.inputs.test_type == 'API' }} | |
| env: | |
| HTTP_PROXY: "http://${{ secrets.RUSSIAN_PROXY }}" | |
| HTTPS_PROXY: "http://${{ secrets.RUSSIAN_PROXY }}" | |
| run: pytest tests/api_tests.py --log-cli-level=DEBUG # --disable-warnings # Без --snapshot-update |