tests #19
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: tests | |
| on: | |
| pull_request: | |
| schedule: | |
| - cron: "17 3 * * *" # daily at 03:17 UTC | |
| workflow_dispatch: | |
| workflow_call: | |
| inputs: | |
| python-version: | |
| required: false | |
| type: string | |
| default: "3.12" | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: tests-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ inputs.python-version || '3.12' }} | |
| cache: "pip" | |
| cache-dependency-path: | | |
| requirements.txt | |
| pyproject.toml | |
| - name: Install project (dev) | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| sudo apt install -y libgtk-3-0 libx11-xcb1 libasound2t64 | |
| python -m camoufox fetch | |
| sudo apt install xvfb | |
| - name: Debug proxy | |
| run: echo "HTTPS_PROXY is $HTTPS_PROXY" | |
| - name: Run tests | |
| env: | |
| HTTPS_PROXY: ${{ secrets.HTTPS_PROXY }} | |
| HTTP_PROXY: ${{ secrets.HTTPS_PROXY }} | |
| run: | | |
| xvfb-run make test-quick |