ci: uv instead of pip; tweak coverage reporting #38
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: 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 | ||
mkdir -p /tmp/src && cd /tmp/src | ||
git clone https://github.com/eyereasoner/eye | ||
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 | ||
run: uv python install | ||
with: | ||
python-version-file: "pyproject.toml" | ||
- name: Install dependencies | ||
run: uv sync --all-extras --dev | ||
- name: Run tests with coverage | ||
run: | | ||
uv run pytest --cov=bubble --cov-report=xml --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 | ||