Skip to content

Environment Checker Integration Test Schedule Run #89

Environment Checker Integration Test Schedule Run

Environment Checker Integration Test Schedule Run #89

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:
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.
# macos-latest is 10.15. We need to test 11 as well.
matrix: # TODO: add more versions and cases where Node.js do not exist
os: [windows-latest, macos-latest, macos-11, ubuntu-latest]
node-version: [12, 14, 16]
func-version: [none, 2, 3]
dotnet-version: [none, 3.1.x, 5.0.x, 6.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 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 }}
- name: Setup .NET SDK
if: ${{ matrix.dotnet-version != 'none' }}
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ matrix.dotnet-version }}
# 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:env-checker
- name: Integration Test
working-directory: ./packages/fx-core
if: runner.os != 'Linux'
run: |
npm run test:env-checker