Skip to content

Conversation

@Sola-ris
Copy link
Contributor

Summary

As discussed on discord, run pytest on Windows and macOS.

I haven't added ripgrep to the list of installed Linux packages, since that will be handled by #1199.

I've omitted the coverage check from the new jobs since the result is the same across all jobs.

Tasks Completed

  • Platforms Tested:
    • Windows x86
    • Windows ARM
    • macOS x86
    • macOS ARM
    • Linux x86
    • Linux ARM
  • Tested For:
    • Basic functionality
    • PyInstaller executable

@Computerdores
Copy link
Collaborator

consider using anchors to deduplicate the python setup steps, for example this should work I believe:

anchors:
  base_setup:
    - name: Checkout repo
      uses: actions/checkout@v4

    - name: Setup Python
      uses: actions/setup-python@v5
      with:
        python-version: '3.12'
        cache: pip

    - name: Install Python dependencies
      run: |
        python -m pip install --upgrade uv
        uv pip install --system .[pytest]

jobs:
  pytest-linux:
    name: Run pytest (Linux)
    runs-on: ubuntu-24.04

    steps:
      <<: *base_setup
      - name: Install system dependencies
        run: |
          sudo apt-get update
          sudo apt-get install -y --no-install-recommends \
            libegl1 \
            libgl1 \
            libopengl0 \
            libpulse0 \
            libxcb-cursor0 \
            libxcb-icccm4 \
            libxcb-image0 \
            libxcb-keysyms1 \
            libxcb-randr0 \
            libxcb-render-util0 \
            libxcb-xinerama0 \
            libxkbcommon-x11-0 \
            libyaml-dev \
            x11-utils
      - name: Execute pytest
        run: |
          xvfb-run pytest --cov-report xml --cov=tagstudio
      - name: Upload coverage
        uses: actions/upload-artifact@v4
        with:
          name: coverage
          path: coverage.xml

  pytest-windows:
    name: Run pytest (Windows)
    runs-on: windows-2025

    steps:
      <<: *base_setup
      - name: Install system dependencies
        run: |
          brew install ripgrep
      - name: Execute pytest
        run: |
          pytest

  pytest-macos:
    name: Run pytest (macOS)
    runs-on: macos-15

    steps:
      <<: *base_setup
      - name: Install system dependencies
        run: |
          brew install ripgrep
      - name: Execute pytest
        run: |
          pytest

@Sola-ris
Copy link
Contributor Author

I wasn't aware GitHub supported anchors, thank you.

The merge keys you mentioned are unfortunately not supported (actions/runner#1182 (comment)) but we can reuse the individual steps via anchors.

@Computerdores
Copy link
Collaborator

The merge keys you mentioned are unfortunately not supported (actions/runner#1182 (comment)) but we can reuse the individual steps via anchors.

lol gitlab does, but hey it's not like Github is operated by a massive company like microsoft or something ^^

@Sola-ris
Copy link
Contributor Author

Sola-ris commented Nov 13, 2025

Small indie company, pls understand^^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🍃 Pending Merge

Development

Successfully merging this pull request may close these issues.

2 participants