ci: run pull-request checks on every base branch #10
Workflow file for this run
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: complex-visual | |
| on: | |
| pull_request: | |
| paths: | |
| - benchmark/complex_visual/** | |
| - tests/test_complex_visual_campaign.py | |
| - .github/workflows/complex-visual.yml | |
| workflow_dispatch: | |
| concurrency: | |
| group: complex-visual-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| headed-pixel-campaign: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - name: Set up Python | |
| uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 | |
| with: | |
| python-version: '3.12' | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2 | |
| with: | |
| version: "0.11.29" | |
| - name: Install dependencies | |
| run: uv sync --locked --extra dev --no-sources | |
| - name: Ensure local X11 fixture tools | |
| run: | | |
| if ! command -v Xvfb >/dev/null || ! command -v xvfb-run >/dev/null; then | |
| sudo apt-get update | |
| sudo apt-get install --yes xvfb xauth | |
| fi | |
| python -c 'import tkinter' | |
| - name: Create dedicated actor identity | |
| run: | | |
| sudo useradd --system --no-create-home --shell /usr/sbin/nologin openadapt-actor | |
| test "$(id -u openadapt-actor)" != "$(id -u)" | |
| - name: Prepare read-only actor runtime | |
| env: | |
| ACTOR_RUNTIME: /tmp/openadapt-actor-runtime-${{ github.run_id }} | |
| run: | | |
| sudo install -d -o root -g root -m 0755 "$ACTOR_RUNTIME/source" | |
| sudo cp -a .venv "$ACTOR_RUNTIME/venv" | |
| sudo cp -a benchmark "$ACTOR_RUNTIME/source/benchmark" | |
| sudo chown -R root:root "$ACTOR_RUNTIME" | |
| sudo chmod -R u=rwX,go=rX "$ACTOR_RUNTIME" | |
| - name: Run headed pixel campaign | |
| env: | |
| COMPLEX_VISUAL_ACTOR_USER: openadapt-actor | |
| COMPLEX_VISUAL_ACTOR_PYTHON: /tmp/openadapt-actor-runtime-${{ github.run_id }}/venv/bin/python | |
| COMPLEX_VISUAL_ACTOR_SOURCE: /tmp/openadapt-actor-runtime-${{ github.run_id }}/source | |
| COMPLEX_VISUAL_OUTPUT: /tmp/complex-visual-artifacts-${{ github.run_id }} | |
| run: >- | |
| xvfb-run --auto-servernum --server-args="-screen 0 1280x700x24 -ac" | |
| uv run --no-sources pytest -q | |
| tests/test_complex_visual_campaign.py | |
| - name: Upload exact campaign evidence | |
| if: always() | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: complex-visual-${{ github.sha }} | |
| path: /tmp/complex-visual-artifacts-${{ github.run_id }} | |
| if-no-files-found: error | |
| retention-days: 7 |