-
Notifications
You must be signed in to change notification settings - Fork 67
54 lines (51 loc) · 2.24 KB
/
tests.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
45
46
47
48
49
50
51
52
53
54
name: Tests
on: [push, pull_request]
jobs:
linter:
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- run: pip install tox
- run: tox -e lint-check
test:
runs-on: windows-2022
strategy:
matrix:
python: ['3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v4
- name: Start audio server
run: net start audiosrv
- name: Disable time sync with Hyper-V & setting system date time
# TODO: Remove the time workaround when virtual audio device certificate is valid again, refs:
# https://github.com/duncanthrax/scream/issues/202
run: |
Set-Service -Name vmictimesync -Status stopped -StartupType disabled
Set-ItemProperty HKLM:\SYSTEM\CurrentControlSet\services\W32Time\Parameters -Name 'Type' -Value 'NoSync'
net stop w32time; Set-Date (Get-Date "2023-07-04 12:00:00")
- name: Install virtual audio device (Scream)
timeout-minutes: 3
env:
VERSION: '4.0'
shell: powershell
run: |
Invoke-WebRequest https://github.com/duncanthrax/scream/releases/download/${{ env.VERSION }}/Scream${{ env.VERSION }}.zip -OutFile Scream${{ env.VERSION }}.zip
Expand-Archive -Path Scream${{ env.VERSION }}.zip -DestinationPath Scream
Import-Certificate -FilePath Scream\Install\driver\x64\scream.cat -CertStoreLocation Cert:\LocalMachine\TrustedPublisher
Scream\Install\helpers\devcon-x64.exe install Scream\Install\driver\x64\Scream.inf *Scream
- name: Resetting system date time
run: |
Set-Service -Name vmictimesync -Status running -StartupType automatic
Set-ItemProperty HKLM:\SYSTEM\CurrentControlSet\services\W32Time\Parameters -Name 'Type' -Value 'NTP'
net start w32time; w32tm /resync /force; $currentDate = Get-Date; Write-Host "Current System Date: $currentDate";
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- run: pip install tox
- run: tox -e py
- name: Run Coverage
if: matrix.python == '3.12'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: tox -e coveralls