v4.0.7-r2 (#112) #176
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: test | |
| on: | |
| push: | |
| branches: | |
| - dev | |
| pull_request: | |
| workflow_dispatch: | |
| concurrency: | |
| # Keep every run on dev so cancelled checks do not pollute the default branch | |
| # commit history. PRs and other branches still share a group and cancel stale runs. | |
| group: ${{ case(github.ref == 'refs/heads/dev', format('{0}-{1}', github.workflow, github.run_id), format('{0}-{1}', github.workflow, github.event.pull_request.number || github.ref)) }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| checks: write | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| jobs: | |
| unit: | |
| name: unit (${{ matrix.settings.name }}) | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| settings: | |
| - name: linux | |
| host: blacksmith-4vcpu-ubuntu-2404 | |
| - name: windows | |
| host: blacksmith-4vcpu-windows-2025 | |
| - name: macos | |
| host: macos-14 | |
| runs-on: ${{ matrix.settings.host }} | |
| defaults: | |
| run: | |
| shell: bash | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Setup Node | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | |
| with: | |
| node-version: "24" | |
| - name: Setup Bun | |
| uses: ./.github/actions/setup-bun | |
| - name: Configure git identity | |
| run: | | |
| git config --global user.email "bot@deepagent-code.ai" | |
| git config --global user.name "deepagent-code" | |
| - name: Cache Turbo | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 | |
| with: | |
| path: node_modules/.cache/turbo | |
| key: turbo-${{ runner.os }}-${{ hashFiles('turbo.json', '**/package.json') }}-${{ github.sha }} | |
| restore-keys: | | |
| turbo-${{ runner.os }}-${{ hashFiles('turbo.json', '**/package.json') }}- | |
| turbo-${{ runner.os }}- | |
| - name: Run unit tests | |
| timeout-minutes: 20 | |
| run: bun turbo test:ci --log-order=stream --log-prefix=task | |
| env: | |
| DEEPAGENT_CODE_EXPERIMENTAL_DISABLE_FILEWATCHER: ${{ runner.os == 'Windows' && 'true' || 'false' }} | |
| - name: Run HttpApi exerciser gates | |
| if: runner.os == 'Linux' | |
| working-directory: packages/deepagent-code | |
| run: bun run test:httpapi | |
| - name: Publish unit reports | |
| if: always() | |
| uses: mikepenz/action-junit-report@bccf2e31636835cf0874589931c4116687171386 # v6.4.0 | |
| with: | |
| report_paths: packages/*/.artifacts/unit/junit.xml | |
| check_name: "unit results (${{ matrix.settings.name }})" | |
| detailed_summary: true | |
| include_time_in_summary: true | |
| fail_on_failure: false | |
| - name: Upload unit artifacts | |
| if: always() | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
| with: | |
| name: unit-${{ matrix.settings.name }}-${{ github.run_attempt }} | |
| include-hidden-files: true | |
| if-no-files-found: ignore | |
| retention-days: 7 | |
| path: packages/*/.artifacts/unit/junit.xml | |
| desktop-smoke: | |
| name: desktop-smoke (macos) | |
| # The prevent-sleep smoke drives the real packaged main bundle through Playwright and asserts | |
| # against pmset, so it needs a macOS runner with a window server; keep it out of the unit matrix. | |
| runs-on: macos-14 | |
| defaults: | |
| run: | |
| shell: bash | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Setup Node | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | |
| with: | |
| node-version: "24" | |
| - name: Setup Bun | |
| uses: ./.github/actions/setup-bun | |
| - name: Build desktop main bundle | |
| working-directory: packages/desktop | |
| run: bun run build | |
| timeout-minutes: 15 | |
| - name: Run prevent-sleep smoke | |
| working-directory: packages/desktop | |
| run: bun run test:prevent-sleep-smoke | |
| timeout-minutes: 10 | |
| e2e: | |
| name: e2e (${{ matrix.settings.name }}) | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| settings: | |
| - name: linux | |
| host: blacksmith-4vcpu-ubuntu-2404 | |
| - name: windows | |
| host: blacksmith-4vcpu-windows-2025 | |
| runs-on: ${{ matrix.settings.host }} | |
| env: | |
| PLAYWRIGHT_BROWSERS_PATH: ${{ github.workspace }}/.playwright-browsers | |
| defaults: | |
| run: | |
| shell: bash | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Setup Node | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | |
| with: | |
| node-version: "24" | |
| - name: Setup Bun | |
| uses: ./.github/actions/setup-bun | |
| - name: Read Playwright version | |
| id: playwright-version | |
| run: | | |
| version=$(node -e 'console.log(require("./package.json").workspaces.catalog["@playwright/test"])') | |
| echo "version=$version" >> "$GITHUB_OUTPUT" | |
| - name: Cache Playwright browsers | |
| id: playwright-cache | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 | |
| with: | |
| path: ${{ github.workspace }}/.playwright-browsers | |
| key: ${{ runner.os }}-${{ runner.arch }}-playwright-${{ steps.playwright-version.outputs.version }}-chromium | |
| - name: Install Playwright system dependencies | |
| if: runner.os == 'Linux' | |
| working-directory: packages/app | |
| run: bunx playwright install-deps chromium | |
| - name: Install Playwright browsers | |
| if: steps.playwright-cache.outputs.cache-hit != 'true' | |
| working-directory: packages/app | |
| run: bunx playwright install chromium | |
| - name: Run app e2e tests | |
| run: bun --cwd packages/app test:e2e:local | |
| env: | |
| CI: true | |
| PLAYWRIGHT_JUNIT_OUTPUT: e2e/junit-${{ matrix.settings.name }}.xml | |
| timeout-minutes: 30 | |
| - name: Upload Playwright artifacts | |
| if: always() | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
| with: | |
| name: playwright-${{ matrix.settings.name }}-${{ github.run_attempt }} | |
| if-no-files-found: ignore | |
| retention-days: 7 | |
| path: | | |
| packages/app/e2e/junit-*.xml | |
| packages/app/e2e/test-results | |
| packages/app/e2e/playwright-report |