name: Run bundle test

on:
  push:
    branches-ignore:
      - develop # the daily release reaches GitHub before PyPI, and these fail in that window
      - master
  pull_request:
    branches-ignore: [ master ]

permissions:
  contents: read

jobs:
  test-bundle:
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
        os: [ubuntu-latest, macOS-latest]
    steps:
    - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
      with:
        persist-credentials: false
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install dependencies
      run: python scripts/ci/install
    - name: Install additional dependencies
      run: pip install virtualenv==16.3.0 setuptools-scm==3.3.3  # same as internal generate-bundle.ts
    - name: Test the bundle
      run: python scripts/ci/test-bundle
