Skip to content

API Tests Daily

API Tests Daily #184

Workflow file for this run

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