Skip to content

test Actions

test Actions #591

Workflow file for this run

name: testing
run-name: test Actions
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
pull_request:
branches:
- main
jobs:
run-all-test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9']
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: Cache Playwright browsers
id: playwright-cache
uses: actions/cache@v4
with:
path: ~/.cache/ms-playwright
key: playwright-${{ runner.os }}-${{ matrix.python-version }}-1.48.0
restore-keys: |
playwright-${{ runner.os }}-${{ matrix.python-version }}-1.48.0-
# Prevent "man-db" trigger updates during apt installs, which can take a long time
- name: Remove man-db
run: sudo apt-get purge -y man-db
shell: bash
- name: Install Playwright
run: |
# Install playwright dependencies if not cached
if [ "${{ steps.playwright-cache.outputs.cache-hit }}" != "true" ]; then
uv run playwright install chromium --with-deps
fi
shell: bash
- name: Create uv virtual environment
run: uv python pin ${{ matrix.python-version }}
shell: bash
- name: Project deps
run: uv sync --dev --no-sources
shell: bash
- name: run test
timeout-minutes: 4
run: uv run pytest tests/
shell: bash