name: toolkit-unit-tests on: push: branches: - main paths-ignore: - '**.md' pull_request: paths-ignore: - '**.md' jobs: build: name: Build strategy: matrix: runs-on: [macos-latest] # Node 18 is the current default Node version in hosted runners, so users may still use the toolkit with it when running tests (see https://github.com/actions/toolkit/issues/1841) # Node 20 is the currently support Node version for actions - https://docs.github.com/actions/sharing-automations/creating-actions/metadata-syntax-for-github-actions#runsusing-for-javascript-actions node-version: [20.x] fail-fast: false runs-on: ${{ matrix.runs-on }} steps: - name: Checkout uses: actions/checkout@v4 - name: Set up Node ${{ matrix.node-version }} uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} - name: npm install run: npm install - name: Bootstrap run: npm run bootstrap - name: Compile run: npm run build - name: npm test env: GITHUB_TOKEN: ${{ github.token }} run: | npx jest --testPathPattern packages/exec/__tests__/exec.test.ts -t "Handles child process holding streams open" - name: sysdiagnose if: ${{ failure() }} run: | sudo sysdiagnose -u -f ${RUNNER_TEMP} -A sysdiagnose.tar.gz - uses: actions/upload-artifact@v4 if: ${{ failure() }} with: name: sysdiagnose path: /Users/runner/work/_temp/sysdiagnose.tar.gz