Skip to content

Add CI badges to README #255

Add CI badges to README

Add CI badges to README #255

Workflow file for this run

name: pytest
on: [ push, pull_request ]
jobs:
python:
runs-on: ubuntu-latest
if: 1
env:
PYTHON_VERSION: ${{ matrix.python }}
IN_CI: 1
strategy:
fail-fast: false
matrix:
python: [ '3.8', '3.9', '3.10', '3.11', '3.12', '3.13' ]
steps:
- uses: actions/checkout@v4
- name: Install deps
run: sudo apt update -y && sudo apt install -y cmake redis-server
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
extensions: embed, curl, redis
coverage: none
- uses: actions/setup-python@v5
with:
python-version: "${{ matrix.python }}"
- name: Show machine information
run: |
date
env
uname -a
ulimit -a
python -V
ls -al
pwd
- name: Build
run: |
cmake . -D CODE_COVERAGE=ON
make -j $(nproc)
- name: Run pytest tests
run: |
sudo service redis-server start
pip install pytest
pytest -v tests/
- name: run coverage
shell: bash
run: sudo apt-get install lcov &&
sudo lcov --directory . --capture --branch-coverage --rc geninfo_unexecuted_blocks=1 --ignore-errors mismatch --output-file coverage.info &&
sudo lcov --remove coverage.info '/usr/*' --output-file coverage.info &&
sudo lcov --list coverage.info
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.info
fail_ci_if_error: true