Skip to content

fixed latest pip version #29

fixed latest pip version

fixed latest pip version #29

Workflow file for this run

name: CI Pipeline
on:
push:
branches:
- master
paths:
- 'gbrl/**' # Trigger on changes to files in the src directory
pull_request:
branches:
- master
workflow_dispatch:
jobs:
build-and-test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.10']
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies on Ubuntu
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y lcov g++ gcc
- name: Set environment variable for coverage
run: echo "COVERAGE=1" >> $GITHUB_ENV
- name: Install Python dependencies and build the project with coverage
run: |
python -m pip install --upgrade pip
python -m pip install coverage
pip install .
- name: Run tests
run: |
coverage run --source=gbrl -m unittest discover tests
- name: Generate coverage report
run: |
coverage report
coverage xml
- name: Generate C++ coverage report
run: |
lcov --capture --directory . --output-file coverage.info
lcov --remove coverage.info '/usr/*' --output-file coverage.info
lcov --list coverage.info
- name: Upload coverage reports as artifacts
uses: actions/upload-artifact@v4
with:
name: coverage-reports
path: |
coverage.xml
coverage.info