Skip to content

refactor

refactor #152

Workflow file for this run

name: Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install SWI-Prolog and EYE reasoner
run: |
sudo apt-get update
sudo apt-get install -y swi-prolog
- name: Install EYE reasoner
run: |
mkdir -p /tmp/src
cd /tmp/src
curl -L https://github.com/eyereasoner/eye/archive/refs/tags/v10.30.10.tar.gz -o eye.tar.gz
tar xzf eye.tar.gz
cd eye-*
sudo sh install.sh
sudo ln -s /opt/eye/bin/eye /usr/bin/eye
- name: Install uv
uses: astral-sh/setup-uv@v4
with:
version: "0.5.5"
- name: "Set up Python"
uses: actions/setup-python@v5
with:
python-version-file: "pyproject.toml"
- name: Install dependencies
run: uv sync --all-extras --dev
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install Node.js dependencies
run: npm ci
- name: Run tests with coverage
run: |
uv run pytest --cov=bubble --md-report --md-report-output tmp.md
echo "## Test coverage" >> $GITHUB_STEP_SUMMARY
uv run coverage report --format=markdown >> $GITHUB_STEP_SUMMARY
echo "## Test results" >> $GITHUB_STEP_SUMMARY
cat tmp.md >> $GITHUB_STEP_SUMMARY