diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2021-01-24 03:59:33 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2021-01-24 04:05:18 +0300 |
commit | 70ed71604721845eca3c23a633bafffda9eeb810 (patch) | |
tree | 68b709557f1061d71a51b1810f456f8524af3d28 | |
parent | README: update (diff) | |
download | windows-env-70ed71604721845eca3c23a633bafffda9eeb810.tar.gz windows-env-70ed71604721845eca3c23a633bafffda9eeb810.zip |
workflows/ci.yml: run the tests
-rw-r--r-- | .github/workflows/ci.yml | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index af3190c..000e229 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,6 +17,8 @@ jobs: name: 'Build: ${{ matrix.platform }}' env: platform: '${{ matrix.platform }}' + global_env: 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment' + user_env: 'HKCU:\Environment' defaults: run: shell: pwsh @@ -38,3 +40,16 @@ jobs: with: name: 'windows-env-${{ matrix.platform }}' path: '${{ runner.workspace }}/install/' + - name: Run the tests + run: | + $((Get-ItemProperty $env:global_env).PATH.Split(';') | Select-String -Pattern '^C:\\dumb$' -Quiet) -and $(throw "Global PATH shouldn't contain C:\dumb") + $((Get-ItemProperty $env:user_env).PATH.Split(';') | Select-String -Pattern '^C:\\dumb$' -Quiet) -and $(throw "User PATH shouldn't contain C:\dumb") + ../install/addpath -y C:\dumb + $((Get-ItemProperty $env:global_env).PATH.Split(';') | Select-String -Pattern '^C:\\dumb$' -Quiet) -and $(throw "Global PATH shouldn't contain C:\dumb") + $((Get-ItemProperty $env:user_env).PATH.Split(';') | Select-String -Pattern '^C:\\dumb$' -Quiet) -or $(throw "User PATH should contain C:\dumb") + ../install/addpath -g -y C:\dumb + $((Get-ItemProperty $env:global_env).PATH.Split(';') | Select-String -Pattern '^C:\\dumb$' -Quiet) -or $(throw "Global PATH should contain C:\dumb") + $((Get-ItemProperty $env:user_env).PATH.Split(';') | Select-String -Pattern '^C:\\dumb$' -Quiet) -or $(throw "User PATH should contain C:\dumb") + ../install/delpath -g -y C:\dumb + $((Get-ItemProperty $env:global_env).PATH.Split(';') | Select-String -Pattern '^C:\\dumb$' -Quiet) -and $(throw "Global PATH shouldn't contain C:\dumb") + $((Get-ItemProperty $env:user_env).PATH.Split(';') | Select-String -Pattern '^C:\\dumb$' -Quiet) -and $(throw "User PATH shouldn't contain C:\dumb") |