setup: potential fixes based on dependencies #2
This file contains hidden or 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: 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: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| cache: pip | |
| - 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: 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 |