feat(cli): doctor command #932
Workflow file for this run
This file contains 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: Environment Checker Integration Test PR Runs | |
on: | |
pull_request: | |
branches: | |
- dev | |
- main | |
- hotfix/** | |
paths: | |
- ".github/workflows/env-checker-ci-pr.yml" | |
- ".github/env-checker" | |
- "packages/fx-core/src/common/deps-checker/**" | |
- "packages/fx-core/tests/common/deps-checker/**" | |
push: | |
branches: | |
- dev | |
- main | |
- hotfix/** | |
paths: | |
- ".github/workflows/env-checker-ci-pr.yml" | |
- ".github/env-checker" | |
- "packages/fx-core/src/common/deps-checker/**" | |
- "packages/fx-core/tests/common/deps-checker/**" | |
workflow_dispatch: # Manual trigger | |
jobs: | |
build-and-test: | |
name: Build and Test OS "${{ matrix.os }}", Node.js "${{ matrix.node-version }}", Azure Functions Core Tools "${{ matrix.func-version }}", .NET SDK "${{ matrix.dotnet-version }}" | |
strategy: | |
## Only test basic cases on PR trigger, because the `cb() never called` issue happens too often, blocking our PRs. | |
## Our original test matrix is quite big, and every case will run `npm install` once, so it is more likely for us to encounter this issue. | |
## Cut the number of test cases to minimize impact. | |
## | |
## Details about this issue: https://github.com/npm/cli/wiki/%22cb()-never-called%3F--I'm-having-the-same-problem!%22 | |
### tl;dr: This error is not one thing, but a category of errors. It means "something broke and we didn't have a way to catch it". We will always need a lot of detail to reproduce an error like this, or we cannot ever fix it. Every instance is unique, and your cb() never called is nothing like any other. | |
matrix: | |
os: [windows-latest, macos-11, ubuntu-latest] | |
node-version: [18] | |
func-version: [none] | |
dotnet-version: [none] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
# Use node 14 to setup project | |
- name: Setup Node.js | |
uses: actions/[email protected] | |
with: | |
node-version: 18 | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
# https://github.com/marketplace/actions/retry-step | |
- name: Setup project with Retry | |
uses: nick-invision/retry@v2 | |
with: | |
timeout_minutes: 10 | |
max_attempts: 3 | |
retry_wait_seconds: 3 | |
on_retry_command: git clean -fXd . | |
command: | | |
npm run setup | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Uninstalling .NET on Windows | |
if: ${{ runner.os == 'Windows' }} | |
run: | | |
powershell -NoProfile -Command ./.github/env-checker/uninstall-dotnet.ps1 | |
- name: Uninstalling .NET on macOS or Ubuntu | |
if: ${{ runner.os == 'macOS' || runner.os == 'Linux' }} | |
run: | | |
./.github/env-checker/uninstall-dotnet.sh | |
- name: Setup Azure Functions Core Tools For Linux | |
if: ${{ runner.os == 'Linux' && matrix.func-version != 'none' }} | |
run: | | |
sudo npm install --unsafe-perm -g azure-functions-core-tools@${{ matrix.func-version }} | |
- name: Setup Azure Functions Core Tools For Windows and macOS | |
if: ${{ runner.os != 'Linux' && matrix.func-version != 'none' }} | |
run: | | |
npm install -g azure-functions-core-tools@${{ matrix.func-version }} | |
- name: Setup .NET SDK | |
if: ${{ matrix.dotnet-version != 'none' }} | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: ${{ matrix.dotnet-version }} | |
## In headless Linux CI machines xvfb is required to run VS Code | |
## https://code.visualstudio.com/api/working-with-extensions/continuous-integration#github-actions | |
- name: Integration Test with xvfb | |
working-directory: ./packages/fx-core | |
if: runner.os == 'Linux' | |
run: | | |
xvfb-run -a npm run test:env-checker | |
- name: Integration Test | |
working-directory: ./packages/fx-core | |
if: runner.os != 'Linux' | |
run: | | |
npm run test:env-checker |