name: Run Pytest with Coverage on: workflow_call: inputs: pr_number: description: 'Pull request number' required: false type: number BEC_CORE_BRANCH: description: 'Branch of BEC Core to install' required: false default: 'main' type: string OPHYD_DEVICES_BRANCH: description: 'Branch of Ophyd Devices to install' required: false default: 'main' type: string BEC_WIDGETS_BRANCH: description: 'Branch of BEC Widgets to install' required: false default: 'main' type: string secrets: CODECOV_TOKEN: required: true permissions: pull-requests: write jobs: pytest: runs-on: ubuntu-latest env: QTWEBENGINE_DISABLE_SANDBOX: 1 QT_QPA_PLATFORM: "offscreen" steps: - name: Checkout BEC Widgets uses: actions/checkout@v4 with: repository: bec-project/bec_widgets ref: ${{ inputs.BEC_WIDGETS_BRANCH }} - name: Install BEC Widgets and dependencies uses: ./.github/actions/bw_install with: BEC_WIDGETS_BRANCH: ${{ inputs.BEC_WIDGETS_BRANCH }} BEC_CORE_BRANCH: ${{ inputs.BEC_CORE_BRANCH }} OPHYD_DEVICES_BRANCH: ${{ inputs.OPHYD_DEVICES_BRANCH }} PYTHON_VERSION: 3.11 - name: Run Pytest with Coverage id: coverage run: pytest --random-order --cov=bec_widgets --cov-config=pyproject.toml --cov-branch --cov-report=xml --no-cov-on-fail tests/unit_tests/ - name: Upload coverage to Codecov uses: codecov/codecov-action@v5 with: token: ${{ secrets.CODECOV_TOKEN }} slug: bec-project/bec_widgets