-
Notifications
You must be signed in to change notification settings - Fork 14
110 lines (93 loc) · 3.59 KB
/
test-macos.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
name: Install MetaCall on MacOS 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
strategy:
fail-fast: false
matrix:
os: [macos-13, macos-14]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install MetaCall
env:
METACALL_INSTALL_DEBUG: 1
run: ./install.sh
- name: NodeJS Test
run: metacall ./test/script.js | grep "123456"
- name: Python Test
run: metacall pip install -r ./test/requirements.txt | grep "Successfully installed"
- name: Deploy & FaaS Test
run: |
metacall deploy --version | grep -E "^v.*\..*\..*"
metacall faas --version | grep -E "^v.*\..*\..*"
- name: REPL Test
run: |
printf "load mock test.mock\ninspect\nexit" \
| metacall \
| grep "function three_str(a_str, b_str, c_str)"
- name: Uninstall MetaCall
env:
METACALL_INSTALL_DEBUG: 1
run: ./install.sh --uninstall
- name: Check Uninstall
# TODO: A good test case would be to do a $(find /) and then
# compare the filesystems before and after installation
run: |
if command -v metacall >/dev/null 2>&1; then
echo "Failed to uninstall MetaCall, the program is still available"
exit 1
fi
install-from-path:
name: Install MetaCall via Path Installation
strategy:
fail-fast: false
matrix:
triplet: [
{os: macos-13, arch: amd64},
{os: macos-14, arch: arm64}
]
package: [tar.gz] # [tar.gz, pkg] # TODO: pkg
runs-on: ${{ matrix.triplet.os }}
steps:
- uses: actions/checkout@v4
- name: Download Tarball
run: |
LATEST_VERSION="$(curl -sqI https://github.com/metacall/distributable-macos/releases/latest | awk -F '/' '/^location/ {print substr($NF, 1, length($NF)-1)}')"
PACKAGE="metacall-tarball-macos-${{ matrix.triplet.arch }}.${{ matrix.package }}"
URL="https://github.com/metacall/distributable-macos/releases/download/$LATEST_VERSION/$PACKAGE"
curl -sL "$URL" -o "metacall-tarball-macos.${{ matrix.package }}"
ls -la metacall-tarball-macos.${{ matrix.package }}
- name: Install MetaCall
env:
METACALL_INSTALL_DEBUG: 1
run: ./install.sh --from-path ./metacall-tarball-macos.${{ matrix.package }}
- name: NodeJS Test
run: metacall ./test/script.js | grep "123456"
- name: Python Test
run: metacall pip install -r ./test/requirements.txt | grep "Successfully installed"
- name: Deploy & FaaS Test
run: |
metacall deploy --version | grep -E "^v.*\..*\..*"
metacall faas --version | grep -E "^v.*\..*\..*"
- name: REPL Test
run: |
printf "load mock test.mock\ninspect\nexit" \
| metacall \
| grep "function three_str(a_str, b_str, c_str)"
- name: Uninstall MetaCall
env:
METACALL_INSTALL_DEBUG: 1
run: ./install.sh --uninstall
- name: Check Uninstall
# TODO: A good test case would be to do a $(find /) and then
# compare the filesystems before and after installation
run: |
if command -v metacall >/dev/null 2>&1; then
echo "Failed to uninstall MetaCall, the program is still available"
exit 1
fi