-
Notifications
You must be signed in to change notification settings - Fork 15
129 lines (112 loc) · 4.21 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
name: Install MetaCall on Windows Test
on: [push, pull_request, workflow_dispatch]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
install-default:
name: Install MetaCall via Default Installation
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Install MetaCall
shell: cmd
env:
METACALL_INSTALL_DEBUG: 1
run: |
powershell -NoProfile -ExecutionPolicy unrestricted ./install.ps1
- name: NodeJS Test
shell: cmd
run: |
metacall ./test/script.js | findstr "123456"
IF %ERRORLEVEL% NEQ 0 exit /B 1
- name: Python Test
shell: cmd
run: |
metacall pip install -r test/requirements.txt | findstr "Successfully installed"
IF %ERRORLEVEL% NEQ 0 exit /B 1
metacall ./test/requirements.py | findstr "123456"
IF %ERRORLEVEL% NEQ 0 exit /B 1
- name: Deploy & FaaS Test
shell: cmd
run: |
metacall deploy --version | findstr /R "^v.*\..*\..*"
IF %ERRORLEVEL% NEQ 0 exit /B 1
metacall faas --version | findstr /R "^v.*\..*\..*"
IF %ERRORLEVEL% NEQ 0 exit /B 1
install-from-path:
name: Install MetaCall via Path Installation
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- 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
shell: cmd
env:
METACALL_INSTALL_DEBUG: 1
run: |
powershell -NoProfile -ExecutionPolicy unrestricted ./install.ps1 -FromPath metacall-tarball-win-x64.zip
- name: NodeJS Test
shell: cmd
run: |
metacall ./test/script.js | findstr "123456"
IF %ERRORLEVEL% NEQ 0 exit /B 1
- name: Python Test
shell: cmd
run: |
metacall pip install -r test/requirements.txt | findstr "Successfully installed"
IF %ERRORLEVEL% NEQ 0 exit /B 1
metacall ./test/requirements.py | findstr "123456"
IF %ERRORLEVEL% NEQ 0 exit /B 1
- name: Deploy & FaaS Test
shell: cmd
run: |
metacall deploy --version | findstr /R "^v.*\..*\..*"
IF %ERRORLEVEL% NEQ 0 exit /B 1
metacall faas --version | findstr /R "^v.*\..*\..*"
IF %ERRORLEVEL% NEQ 0 exit /B 1
install-path-with-whitespaces:
name: Install MetaCall via Path With Whitespaces
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Create install folder
shell: cmd
run: |
mkdir "install folder with spaces"
- name: Install MetaCall
shell: cmd
env:
METACALL_INSTALL_DEBUG: 1
run: |
powershell -NoProfile -ExecutionPolicy unrestricted ./install.ps1 -InstallDir '%cd%\install folder with spaces'
- name: Check MetaCall is installed
shell: cmd
run: |
dir "%cd%\install folder with spaces"
- name: NodeJS Test
shell: cmd
run: |
metacall ./test/script.js | findstr "123456"
IF %ERRORLEVEL% NEQ 0 exit /B 1
- name: Python Test
shell: cmd
run: |
metacall pip install -r test/requirements.txt | findstr "Successfully installed"
IF %ERRORLEVEL% NEQ 0 exit /B 1
metacall ./test/requirements.py | findstr "123456"
IF %ERRORLEVEL% NEQ 0 exit /B 1
- name: Deploy & FaaS Test
shell: cmd
run: |
metacall deploy --version | findstr /R "^v.*\..*\..*"
IF %ERRORLEVEL% NEQ 0 exit /B 1
metacall faas --version | findstr /R "^v.*\..*\..*"
IF %ERRORLEVEL% NEQ 0 exit /B 1