Implemented uninstall parameter flag for install.ps1 script for Windows #123
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |