Skip to content

fix: numpy dependency added #3

fix: numpy dependency added

fix: numpy dependency added #3

Workflow file for this run

name: MeTTa tests
on:
pull_request:
branches:
- main
merge_group:
push:
branches:
- "**"
workflow_dispatch:
permissions:
contents: read
env:
PETTA_REPOSITORY: https://github.com/trueagi-io/PeTTa.git
PETTA_REF: v1.0.2
jobs:
petta-tests:
name: Run MeTTa tests with PeTTa
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout MetaMo
uses: actions/checkout@v4
- name: Install SWI-Prolog
run: |
sudo apt-get update
sudo apt-get install -y software-properties-common
sudo apt-add-repository -y ppa:swi-prolog/stable
sudo apt-get update
sudo apt-get install -y swi-prolog
swipl --version
dpkg --compare-versions "$(swipl --version | awk '{print $3}')" ge 9.1.12
- name: Detect SWI-Prolog Python version
id: swi-python
run: |
set -o pipefail
version="$(
swipl -q -g "use_module(library(janus)), py_call(sys:version, Version), writeln(Version), halt." \
| awk '{print $1}' \
| cut -d. -f1,2
)"
test -n "$version"
echo "SWI-Prolog embeds Python $version"
echo "version=$version" >> "$GITHUB_OUTPUT"
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ steps.swi-python.outputs.version }}
cache: pip
- name: Checkout PeTTa
run: |
git clone --depth 1 --branch "$PETTA_REF" "$PETTA_REPOSITORY" "$RUNNER_TEMP/PeTTa"
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install "$RUNNER_TEMP/PeTTa"
- name: Run MeTTa test files
env:
PETTA_PATH: ${{ runner.temp }}/PeTTa
run: |
python scripts/run-tests.py