-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (35 loc) · 1.2 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Test
on:
pull_request:
branches:
- main
push:
branches: [develop, main]
jobs:
build:
runs-on: windows-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Setup Virtualhere Client
uses: ./
with:
vc-version: '>=5.5.6'
- name: Run Add Hub
run: VC-Hub-Add -Server "${{ secrets.VIRTUALHERE_SERVER }}"
- name: Run Find USB Token
run: |
$success, $tokenAddress, $already = VC-Device-Add -DeviceName "${{ vars.VIRTUALHERE_DEVICE }}"
if (!$success) {
throw [System.Exception]::new("Device Not Added. ${{ vars.VIRTUALHERE_DEVICE }}")
}
"TOKEN_ADDRESS=$tokenAddress" | Out-File -FilePath $env:GITHUB_OUTPUT -Append
"ALREADY=$already" | Out-File -FilePath $env:GITHUB_OUTPUT -Append
id: find-usb-token
- name: Run Check Add Device
run: VC-Pipe "LIST"
- name: Post Run Stop
if: always() && steps.find-usb-token.outputs.ALREADY == 'false'
run: |
VC-Pipe "STOP USING,${{ steps.find-usb-token.outputs.TOKEN_ADDRESS }}"
VC-Pipe "MANUAL HUB REMOVE,${{ secrets.VIRTUALHERE_SERVER }}"