QVAC-24073 feat[bc]: adopt fabric b10297 consumers and replace no_mmap with load_mode #3860
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
| # QVAC SDK E2E Tests - PR Trigger | |
| # | |
| # Triggers SDK e2e tests via test-sdk.yml when: | |
| # - "test-e2e-smoke" label applied: runs smoke suite on desktop + mobile | |
| # - "test-e2e-full" label applied: runs full suite on desktop + mobile | |
| # - PR opened/updated targeting release-* branch with SDK/inference changes: runs full suite | |
| # | |
| # On success, applies "e2e-tested" label to the PR. | |
| # | |
| # Uses pull_request_target for secrets access (Device Farm, MQTT). | |
| # Authorization gate prevents untrusted fork PRs from running. | |
| name: QVAC Tests (sdk) - PR | |
| on: | |
| pull_request_target: | |
| types: [labeled, opened, synchronize] | |
| paths: | |
| - "packages/sdk/**" | |
| - "packages/inference/**" | |
| permissions: | |
| actions: read | |
| id-token: write | |
| contents: read | |
| pull-requests: write | |
| packages: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| fork-approval: | |
| permissions: | |
| statuses: write | |
| uses: ./.github/workflows/reusable-fork-approval.yml | |
| resolve-config: | |
| needs: [fork-approval] | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| statuses: read | |
| runs-on: ubuntu-latest | |
| outputs: | |
| should-run: ${{ steps.check.outputs.should-run }} | |
| suite: ${{ steps.check.outputs.suite }} | |
| steps: | |
| - name: Checkout authorize-pr (default branch) | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2 | |
| with: | |
| ref: ${{ github.event.repository.default_branch }} | |
| sparse-checkout: .github/actions/authorize-pr | |
| sparse-checkout-cone-mode: false | |
| persist-credentials: false | |
| - name: Authorize PR | |
| id: auth | |
| uses: ./.github/actions/authorize-pr | |
| with: | |
| label: safe-to-test | |
| github-token: ${{ github.token }} | |
| - name: Determine test config | |
| if: steps.auth.outputs.allowed == 'true' | |
| id: check | |
| shell: bash | |
| env: | |
| EVENT: ${{ github.event.action }} | |
| LABEL: ${{ github.event.label.name }} | |
| TARGET: ${{ github.base_ref }} | |
| run: | | |
| if [ "$EVENT" = "labeled" ]; then | |
| if [ "$LABEL" = "test-e2e-smoke" ]; then | |
| echo "should-run=true" >> "$GITHUB_OUTPUT" | |
| echo "suite=smoke" >> "$GITHUB_OUTPUT" | |
| elif [ "$LABEL" = "test-e2e-full" ]; then | |
| echo "should-run=true" >> "$GITHUB_OUTPUT" | |
| echo "suite=" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "::notice::Ignoring unrelated label: $LABEL" | |
| echo "should-run=false" >> "$GITHUB_OUTPUT" | |
| fi | |
| elif echo "$TARGET" | grep -q '^release-'; then | |
| # Path filter already ensures SDK or inference changes exist. | |
| echo "::notice::Release branch PR with SDK/inference changes — running full suite" | |
| echo "should-run=true" >> "$GITHUB_OUTPUT" | |
| echo "suite=" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "should-run=false" >> "$GITHUB_OUTPUT" | |
| fi | |
| run-tests: | |
| needs: | |
| - fork-approval | |
| - resolve-config | |
| if: (needs.resolve-config.outputs.should-run == 'true') | |
| uses: ./.github/workflows/test-sdk.yml | |
| with: | |
| targets: desktop + mobile | |
| suite: ${{ needs.resolve-config.outputs.suite }} | |
| test-version: ${{ github.event.pull_request.head.sha }} | |
| inference-source: branch | |
| secrets: inherit | |
| apply-label: | |
| needs: run-tests | |
| if: success() | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pull-requests: write | |
| steps: | |
| - name: Apply e2e-tested label | |
| uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # 7.0.1 | |
| with: | |
| script: | | |
| await github.rest.issues.addLabels({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: context.payload.pull_request.number, | |
| labels: ['e2e-tested'] | |
| }); |