-
Notifications
You must be signed in to change notification settings - Fork 14
61 lines (59 loc) · 2.56 KB
/
test-windows.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
55
56
57
58
59
60
61
name: Install Metacall on Windows Test
on: [push, pull_request, workflow_dispatch]
jobs:
install-default:
name: Install Metacall via Default Installation
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Install Metacall
run: |
cmd.exe /c "powershell -NoProfile -ExecutionPolicy unrestricted ./install.ps1"
- name: Run Metacall
run: |
metacall ./test/script.js | findstr "123456"
if not %ERRORLEVEL% EQU 0 exit /B 1
- name: Python Test
run: |
metacall pip install -r test/requirements.txt | findstr "Successfully installed"
if not %ERRORLEVEL% EQU 0 exit /B 1
metacall ./test/requirements.py | findstr "123456"
if not %ERRORLEVEL% EQU 0 exit /B 1
- name: Deploy & FaaS Test
run: |
metacall deploy --version | findstr /R "^v.*\..*\..*"
if not %ERRORLEVEL% EQU 0 exit /B 1
metacall faas --version | findstr /R "^v.*\..*\..*"
if not %ERRORLEVEL% EQU 0 exit /B 1
install-from-path:
name: Install Metacall via Path Installation
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Download Tarball
shell: pwsh
run: |
$request = Invoke-WebRequest -UseBasicParsing -Method Head -Uri https://github.com/metacall/distributable-windows/releases/latest
$redirectUri = $request.BaseResponse.RequestMessage.RequestUri
$version = $redirectUri.Segments[$redirectUri.Segments.Count - 1]
$url = "https://github.com/metacall/distributable-windows/releases/download/$version/metacall-tarball-win-x64.zip"
Invoke-WebRequest $url -OutFile metacall-tarball-win-x64.zip
- name: Install MetaCall
run: |
cmd.exe /c "powershell -NoProfile -ExecutionPolicy unrestricted ./install.ps1 -FromPath metacall-tarball-win-x64.zip"
- name: Run Metacall
run: |
metacall ./test/script.js | findstr "123456"
if not %ERRORLEVEL% EQU 0 exit /B 1
- name: Python Test
run: |
metacall pip install -r test/requirements.txt | findstr "Successfully installed"
if not %ERRORLEVEL% EQU 0 exit /B 1
metacall ./test/requirements.py | findstr "123456"
if not %ERRORLEVEL% EQU 0 exit /B 1
- name: Deploy & FaaS Test
run: |
metacall deploy --version | findstr /R "^v.*\..*\..*"
if not %ERRORLEVEL% EQU 0 exit /B 1
metacall faas --version | findstr /R "^v.*\..*\..*"
if not %ERRORLEVEL% EQU 0 exit /B 1