This repository has been archived by the owner on May 2, 2024. It is now read-only.
LSP End to End Tests #57
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: LSP End to End Tests | |
on: | |
workflow_dispatch: | |
inputs: | |
automationBranch: | |
description: 'Set the branch to use for automation tests' | |
required: false | |
default: 'develop' | |
type: string | |
auraLsp: | |
description: 'auraLsp.e2e.ts' | |
required: false | |
default: false | |
type: boolean | |
lwcLsp: | |
description: 'lwcLsp.e2e.ts' | |
required: false | |
default: false | |
type: boolean | |
visualforceLsp: | |
description: 'visualforceLsp.e2e.ts' | |
required: false | |
default: false | |
type: boolean | |
jobs: | |
build: | |
env: | |
ENV_TESTS_TO_RUN: '' | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-latest, windows-latest, ubuntu-latest] | |
nodeVersion: | |
- 16.15.1 | |
vscodeVersion: | |
- stable | |
steps: | |
# - name: Checkout | |
# uses: actions/checkout@v3 | |
# with: | |
# path: ./salesforcedx-vscode | |
# ref: ${{ github.event.ref }} | |
# - uses: actions/setup-node@v3 | |
# with: | |
# node-version: ${{ matrix.nodeVersion }} | |
# cache: npm | |
# cache-dependency-path: | | |
# salesforcedx-vscode/package-lock.json | |
# salesforcedx-vscode-automation-tests/package-lock.json | |
# - name: Clone automation tests | |
# uses: actions/checkout@v3 | |
# with: | |
# repository: forcedotcom/salesforcedx-vscode-automation-tests | |
# path: salesforcedx-vscode-automation-tests | |
# ref: ${{ inputs.automationBranch }} | |
# - name: Install Extension Dependencies | |
# run: | | |
# npm install | |
# npm run compile | |
# working-directory: salesforcedx-vscode | |
# - name: Install Test Dependencies | |
# run: | | |
# npm install | |
# working-directory: salesforcedx-vscode-automation-tests | |
# - name: Install the SFDX CLI | |
# run: npm install -g sfdx-cli | |
# - name: Verify CLI | |
# shell: bash | |
# run: | | |
# set -e | |
# sfdx version | |
# SFDX_CLI_VERSION=$(sfdx version) | |
# if [[ ((`echo $SFDX_CLI_VERSION | grep -c "sfdx-cli/"` > 0))]] | |
# then | |
# echo "sfdx-cli installed -" $SFDX_CLI_VERSION | |
# else | |
# echo "The sfdx-cli installation could not be verified" | |
# exit 1 | |
# fi | |
- name: Check which e2e tests are selected | |
shell: bash | |
run: | | |
TESTS_TO_RUN=dummyvalue | |
echo 'inside check which e2e tests are selected' | |
echo 'before if statement block' | |
if (${{ inputs.auraLsp }} == true) | |
then | |
TESTS_TO_RUN=$TESTS_TO_RUN+auraLsp.e2e.ts | |
echo 'auraLsp is selected' | |
fi | |
if (${{ inputs.lwcLsp }} == true) | |
then | |
TESTS_TO_RUN=$TESTS_TO_RUN+lwcLsp.e2e.ts | |
echo 'lwcLsp is selected' | |
fi | |
if (${{ inputs.visualforceLsp }} == true) | |
then | |
TESTS_TO_RUN=$TESTS_TO_RUN+visualforceLsp.e2e.ts | |
echo 'visualforceLsp is selected' | |
fi | |
echo 'after if statement block' | |
echo $TESTS_TO_RUN | |
Write-Host "##vso[task.setvariable variable=env.ENV_TESTS_TO_RUN;]$TESTS_TO_RUN" | |
# env.ENV_TESTS_TO_RUN = $TESTS_TO_RUN | |
echo ${{ env.ENV_TESTS_TO_RUN }} | |
# - name: Run headless test | |
# uses: coactions/setup-xvfb@b6b4fcfb9f5a895edadc3bc76318fae0ac17c8b3 | |
# with: | |
# run: | | |
# npm run setup | |
# npm run automation-tests | |
# echo 'testsToRun = ' + ${{ env.ENV_TESTS_TO_RUN }} | |
# echo 'auraLsp = ' + ${{ inputs.auraLsp }} | |
# echo 'lwcLsp = ' + ${{ inputs.lwcLsp }} | |
# echo 'visualforceLwp = ' + ${{ inputs.visualforceLsp }} | |
# working-directory: salesforcedx-vscode-automation-tests | |
# env: | |
# VSCODE_VERSION: ${{ matrix.vscodeVersion }} | |
# SPEC_FILES: ${{ env.ENV_TESTS_TO_RUN }} | |
# SFDX_AUTH_URL: ${{ secrets.SFDX_AUTH_URL_E2E }} | |
# ORG_ID: ${{ secrets.ORG_ID_E2E }} | |
# - uses: actions/upload-artifact@v3 | |
# if: failure() | |
# with: | |
# name: screenshots | |
# path: ./salesforcedx-vscode-automation-tests/screenshots |