diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index a7d53de390a8..a9d65fad17c5 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -815,6 +815,69 @@ jobs: path: .nyc_output retention-days: 1 +perf-tests: + timeout-minutes: 30 + name: Performance tests + # The value of runs-on is the OS of the current job (specified in the strategy matrix below) instead of being hardcoded. + runs-on: ${{ matrix.os }} + if: github.repository == 'microsoft/vscode-jupyter' + needs: [build-vsix, pick_environment] + env: + VSIX_NAME: ${{ needs.pick_environment.outputs.vsix_name }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + python: [3.9] + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Use Python ${{matrix.python}} + uses: actions/setup-python@v2 + with: + python-version: ${{matrix.python}} + + - name: Set CI Path + uses: ./.github/actions/set-python + id: set-python + with: + PYTHON_VERSION: ${{matrix.python}} + + - name: Upgrade pip + run: python -m pip install -U pip + + - name: Use Node ${{env.NODE_VERSION}} + uses: actions/setup-node@v2.4.1 + with: + node-version: ${{env.NODE_VERSION}} + + - name: Download VSIX + uses: actions/download-artifact@v2 + with: + name: ${{needs.pick_environment.outputs.vsix_name}} + + - name: Install dependencies (npm ci) + run: npm ci --prefer-offline + + - name: pip install system test requirements + run: | + python -m pip install --upgrade -r build/venv-test-requirements.txt + python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade -r requirements.txt + shell: bash + + # Compile the test files. + - name: Prepare for perf tests + run: npx tsc -p ./ + shell: bash + + - name: Run desktop perf tests + env: + DISPLAY: 10 + uses: GabrielBB/xvfb-action@v1.4 + with: + run: npm run testPerformance + coverage: name: Coverage reports upload runs-on: ubuntu-latest