Environment Checker Integration Test Schedule Run #1454
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 Schedule Run | |
on: | |
schedule: | |
# Runs everyday 15:42 China Time. Avoid start of hour because these are high load times. | |
- cron: '42 7 * * *' | |
workflow_dispatch: # Manual trigger | |
jobs: | |
func: | |
name: Build and Test OS "${{ matrix.os }}", Node.js "${{ matrix.node-version }}", Azure Functions Core Tools "${{ matrix.func-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. | |
# macos-latest is 10.15. We need to test 11 as well. | |
matrix: | |
os: [windows-latest, macos-latest, macos-11, ubuntu-latest] | |
node-version: [16, 18, 20] | |
func-version: [none, "3", "4", "4.0.4670", "~4.0.5174"] | |
max-parallel: 30 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
# Use node 18 to setup project | |
- name: Setup Node.js | |
uses: actions/[email protected] | |
with: | |
node-version: 18 | |
- uses: pnpm/action-setup@v4 | |
# https://github.com/marketplace/actions/retry-step | |
- name: Setup project with Retry | |
uses: nick-invision/retry@v2 | |
with: | |
timeout_minutes: 15 | |
max_attempts: 3 | |
retry_wait_seconds: 10 | |
on_retry_command: git clean -fXd . | |
command: | | |
npx lerna exec -- rm -rf node_modules | |
npm run setup --legacy-peer-deps | |
- name: Setup Node.js | |
uses: actions/[email protected] | |
with: | |
node-version: ${{ matrix.node-version }} | |
- 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 }} | |
## 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:func-checker | |
- name: Integration Test | |
working-directory: ./packages/fx-core | |
if: runner.os != 'Linux' | |
run: | | |
npm run test:func-checker | |
node: | |
name: Build and Test OS "${{ matrix.os }}", Node.js "${{ matrix.node-version }}" | |
strategy: | |
matrix: # TODO: add more versions and cases where Node.js do not exist | |
os: [windows-latest, macos-latest, macos-11, ubuntu-latest] | |
node-version: [16, 18] | |
max-parallel: 30 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
# Use node 18 to setup project | |
- name: Setup Node.js | |
uses: actions/[email protected] | |
with: | |
node-version: 18 | |
- uses: pnpm/action-setup@v4 | |
# https://github.com/marketplace/actions/retry-step | |
- name: Setup project with Retry | |
uses: nick-invision/retry@v2 | |
with: | |
timeout_minutes: 15 | |
max_attempts: 3 | |
retry_wait_seconds: 10 | |
on_retry_command: git clean -fXd . | |
command: | | |
npx lerna exec -- rm -rf node_modules | |
npm run setup --legacy-peer-deps | |
- name: Setup Node.js | |
uses: actions/[email protected] | |
with: | |
node-version: ${{ matrix.node-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:node-checker | |
- name: Integration Test | |
working-directory: ./packages/fx-core | |
if: runner.os != 'Linux' | |
run: | | |
npm run test:node-checker | |
dotnet: | |
name: Build and Test OS "${{ matrix.os }}", .NET SDK "${{ matrix.dotnet-version }}" | |
strategy: | |
matrix: | |
os: [windows-latest, macos-latest, macos-13, macos-12, ubuntu-latest] | |
dotnet-version: [none, 3.1.x, 5.0.x, 6.0.x] | |
exclude: | |
- os: macos-latest | |
dotnet-version: 3.1.x | |
- os: macos-latest | |
dotnet-version: 5.0.x | |
max-parallel: 30 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- 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 .NET SDK | |
if: ${{ matrix.dotnet-version != 'none' }} | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: ${{ matrix.dotnet-version }} | |
# Use node 18 to setup project | |
- name: Setup Node.js | |
uses: actions/[email protected] | |
with: | |
node-version: 18 | |
- uses: pnpm/action-setup@v4 | |
# https://github.com/marketplace/actions/retry-step | |
- name: Setup project with Retry | |
uses: nick-invision/retry@v2 | |
with: | |
timeout_minutes: 15 | |
max_attempts: 3 | |
retry_wait_seconds: 10 | |
on_retry_command: git clean -fXd . | |
command: | | |
npx lerna exec -- rm -rf node_modules | |
npm run setup --legacy-peer-deps | |
## 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:dotnet-checker | |
- name: Integration Test | |
working-directory: ./packages/fx-core | |
if: runner.os != 'Linux' | |
run: | | |
npm run test:dotnet-checker | |