Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): run server tests on Windows #958

Draft
wants to merge 62 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
67f8cb3
chore(ci): add OpenVPN configuration
krishna-acondy Aug 30, 2021
23e3883
chore(ci): install gnuPG before openVPN
krishna-acondy Aug 30, 2021
e5b3d91
chore(ci): non-interactive install
krishna-acondy Aug 30, 2021
6c5139b
chore(ci): install openVPN connect
krishna-acondy Aug 30, 2021
037fc6b
chore(ci): add OpenVPN to path
krishna-acondy Aug 30, 2021
2a7bc21
chore(ci): add openVPN to path
krishna-acondy Aug 30, 2021
8c6a80a
chore(ci): add OpenVPN to path
krishna-acondy Aug 30, 2021
cde2150
chore(ci): install gnuPG
krishna-acondy Aug 30, 2021
f28d238
chore(ci): remove gnuPG
krishna-acondy Aug 30, 2021
e77202d
chore(ci): install GPG4Win
krishna-acondy Aug 30, 2021
44fb833
chore(ci): debug
krishna-acondy Aug 30, 2021
f8a70c8
chore(ci): debug
krishna-acondy Aug 30, 2021
4c80dba
chore(ci): debug
krishna-acondy Aug 30, 2021
79aacc6
chore(ci): debug
krishna-acondy Aug 30, 2021
e3b4513
chore(ci): debug
krishna-acondy Aug 30, 2021
e56f3c3
chore(ci): debug
krishna-acondy Aug 30, 2021
f8c81cc
chore(ci): debug
krishna-acondy Aug 30, 2021
3ae83f1
chore(ci): debug
krishna-acondy Aug 30, 2021
0711fc9
chore(ci): start OpenVPN
krishna-acondy Aug 30, 2021
973009d
chore(ci): add server tests step
krishna-acondy Aug 30, 2021
a835e3c
chore(ci): fix typo
krishna-acondy Aug 30, 2021
13eb0b1
chore(ci): debug
krishna-acondy Aug 30, 2021
6ed1ca8
chore(ci): debug
krishna-acondy Aug 30, 2021
96d8a8f
chore(ci): debug
krishna-acondy Aug 30, 2021
d10cf12
chore(ci): debug
krishna-acondy Aug 30, 2021
f87b9f7
chore(ci): debug
krishna-acondy Aug 30, 2021
22f1ac6
chore(ci): debug
krishna-acondy Aug 30, 2021
1aa06f5
chore(ci): debug
krishna-acondy Aug 30, 2021
52f607e
chore(ci): debug
krishna-acondy Aug 30, 2021
b8ffb88
chore(ci): debug
krishna-acondy Aug 30, 2021
bfa8c28
chore(ci): debug
krishna-acondy Aug 30, 2021
c24d052
chore(ci): debug
krishna-acondy Aug 30, 2021
c03bfbd
chore(ci): debug
krishna-acondy Aug 30, 2021
5f430e6
chore(ci): debug
krishna-acondy Aug 30, 2021
08c236d
chore(ci): debug
krishna-acondy Aug 30, 2021
8a44ece
chore(ci): debug
krishna-acondy Aug 30, 2021
a9840b9
chore(ci): debug
krishna-acondy Aug 30, 2021
ab863f3
chore(ci): debug
krishna-acondy Aug 31, 2021
b680d4d
chore(ci): install GPG
krishna-acondy Aug 31, 2021
65baabd
chore(ci): change windows image
krishna-acondy Aug 31, 2021
c557861
chore(ci): use powershell
krishna-acondy Aug 31, 2021
58e9f96
chore(ci): debug
krishna-acondy Aug 31, 2021
dd43418
chore(ci): debug
krishna-acondy Aug 31, 2021
a8df413
chore(ci): install GnuPG
krishna-acondy Sep 2, 2021
a395f8c
chore(ci): install openVPN
krishna-acondy Sep 2, 2021
4426903
chore(ci): connect to VPN
krishna-acondy Sep 2, 2021
373938d
chore(ci): fix path
krishna-acondy Sep 2, 2021
e441996
Merge branch 'main' of https://github.com/sasjs/cli into windows-serv…
krishna-acondy Sep 2, 2021
a3c3412
chore(ci): debug
krishna-acondy Sep 2, 2021
9277b14
chore(ci): write certificate files
krishna-acondy Sep 2, 2021
68ac0c5
chore(ci): clean up
krishna-acondy Sep 2, 2021
2a838f5
chore(ci): disable firewall
krishna-acondy Sep 2, 2021
f7c2c6c
chore(ci): disable firewall
krishna-acondy Sep 2, 2021
fe178e6
chore(ci): change to tcp
krishna-acondy Sep 2, 2021
32ed2fc
chore(ci): revert, add auth algorithm
krishna-acondy Sep 2, 2021
ce76814
chore(ci): try sha512
krishna-acondy Sep 2, 2021
dc596bc
chore(ci): change cert type
krishna-acondy Sep 2, 2021
acbae6d
chore(ci): remove sha512
krishna-acondy Sep 6, 2021
b7f8027
chore(ci): install OpenSSL
krishna-acondy Sep 6, 2021
8ed0712
chore(ci): rewrite cert files
krishna-acondy Sep 6, 2021
7b9fc05
chore(ci): disable firewall
krishna-acondy Sep 6, 2021
9db691b
chore(ci): add openSSL to path
krishna-acondy Sep 6, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/vpn/config.ovpn
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ remote vpn.analytium.co.uk 1194 udp
remote vpn.analytium.co.uk 1194 udp
dev tun
dev-type tun
ns-cert-type server
remote-cert-tls server
setenv opt tls-version-min 1.0 or-highest
reneg-sec 604800
sndbuf 0
Expand All @@ -27,4 +27,4 @@ setenv PUSH_PEER_INFO
ca ca.crt
cert user.crt
key user.key
tls-auth tls.key 1
tls-auth tls.key 1
58 changes: 52 additions & 6 deletions .github/workflows/run-tests-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,48 @@ jobs:
with:
node-version: ${{ matrix.node-version }}

- name: Disable Firewall
run: |
netsh advfirewall set allprofiles state off
Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled False

- name: Install OpenSSL
run: |
$env:PATH = "C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\ProgramData\chocolatey\bin"
[Environment]::SetEnvironmentVariable("Path", $env:PATH, "Machine")
choco install --yes openssl --no-progress
echo "C:\Program Files\OpenSSL-Win64\bin" >> $env:GITHUB_PATH
shell: powershell

- name: Install OpenVPN
run: |
$env:PATH = "C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\ProgramData\chocolatey\bin"
[Environment]::SetEnvironmentVariable("Path", $env:PATH, "Machine")
choco install --yes openvpn --no-progress
echo "C:\Program Files\OpenVPN\bin" >> $env:GITHUB_PATH
shell: powershell

- name: Write VPN Files
run: |
echo $Env:CA_CRT | Out-File -FilePath .github/vpn/ca.crt -Encoding utf8
echo $Env:USER_CRT | Out-File -FilePath .github/vpn/user.crt -Encoding utf8
echo $Env:USER_KEY | Out-File -FilePath .github/vpn/user.key -Encoding utf8
echo $Env:TLS_KEY | Out-File -FilePath .github/vpn/tls.key -Encoding utf8
env:
CA_CRT: ${{ secrets.CA_CRT}}
USER_CRT: ${{ secrets.USER_CRT }}
USER_KEY: ${{ secrets.USER_KEY }}
TLS_KEY: ${{ secrets.TLS_KEY }}

- name: Connect to VPN
run: cd .github/vpn && openvpn --config config.ovpn

- name: Install Doxygen
run: choco install doxygen.install --version 1.9.1
run: choco install doxygen.install --version 1.9.1 --no-progress

- name: Add doxygen to path
- name: Add Doxygen to path
run: echo "C:\Program Files\doxygen\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append

- name: Check doxygen version
run: doxygen -v

- name: Install dependencies
run: npm ci

Expand All @@ -42,7 +75,7 @@ jobs:
- name: Link
run: npm link

- name: npm prefix for user
- name: Write .npmrc file
run: echo prefix=C:\npm\prefix >> ~\.npmrc

- name: Run mocked tests
Expand All @@ -57,3 +90,16 @@ jobs:
SAS9_SERVER_URL: ${{secrets.SAS9_SERVER_URL}}
ACCESS_TOKEN: ${{secrets.ACCESS_TOKEN}}
REFRESH_TOKEN: ${{secrets.REFRESH_TOKEN}}

- name: Run server tests
run: npm run test:server
env:
CI: true
CLIENT: ${{secrets.CLIENT}}
SECRET: ${{secrets.SECRET}}
SAS_USERNAME: ${{secrets.SAS_USERNAME}}
SAS_PASSWORD: ${{secrets.SAS_PASSWORD}}
VIYA_SERVER_URL: ${{secrets.VIYA_SERVER_URL}}
SAS9_SERVER_URL: ${{secrets.SAS9_SERVER_URL}}
ACCESS_TOKEN: ${{secrets.ACCESS_TOKEN}}
REFRESH_TOKEN: ${{secrets.REFRESH_TOKEN}}