Add VSCode to PATH #22
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: Provision Windows VM using reusable workflow | |
on: [push] | |
jobs: | |
start-ec2-instance: | |
uses: ./.github/workflows/provision-runner.yml | |
with: | |
ec2-image-id: ami-0b7d4973163feb944 | |
ec2-instance-type: t2.micro | |
security-group-id: sg-0a3e6b53e86d0e69d | |
subnet-id: subnet-06113672589e7e836 | |
ec2-os-type: windows | |
secrets: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
github-token: ${{ secrets.GH_RUNNER_API_TOKEN }} | |
run-tests: | |
needs: start-ec2-instance | |
runs-on: ${{ needs.start-ec2-instance.outputs.instance_label }} | |
steps: | |
# - name: Install Chocolatey | |
# run: | | |
# Set-ExecutionPolicy Bypass -Scope Process -Force; | |
# [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12; | |
# iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')) | |
# shell: powershell | |
# | |
# - name: Install VSCode | |
# run: choco install vscode -y | |
# shell: powershell | |
# | |
# - name: Install Node.js | |
# run: choco install nodejs -y | |
# shell: powershell | |
# | |
# - name: Verify Installations | |
# run: | | |
# code --version | |
# node --version | |
# shell: powershell | |
- name: Add VSCode to PATH | |
run: | | |
$env:PATH = "C:\Program Files\Microsoft VS Code;$env:PATH" | |
shell: powershell | |
- name: Check Env PATH variable | |
shell: powershell | |
run: echo $env:PATH | |
- name: Check VSCode installation | |
shell: powershell | |
run: code --version | |
- name: Clone kai-ci repo | |
shell: powershell | |
run: | | |
mkdir ./kai-ci-temp | |
cd ./kai-ci-temp | |
git clone https://github.com/konveyor/kai-ci.git | |
cd kai-ci | |
- name: Install npm dependencies | |
shell: powershell | |
run: | | |
npm install . | |
- name: Run tests | |
shell: powershell | |
run: | | |
npx playwright test | |
stop-ec2-instance: | |
needs: [ start-ec2-instance,run-tests ] | |
if: always() | |
uses: ./.github/workflows/remove-runner.yml | |
with: | |
ec2-instance-id: ${{ needs.start-ec2-instance.outputs.ec2-instance-id }} | |
ec2-runner-label: ${{ needs.start-ec2-instance.outputs.instance_label }} | |
secrets: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
github-token: ${{ secrets.GH_RUNNER_API_TOKEN }} |