name: CI on: push: branches: [ "**" ] pull_request: branches: [ "**" ] jobs: build: strategy: matrix: os: [ubuntu-latest, windows-latest, macos-latest] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 with: python-version: '3.11' - name: Install build tools shell: bash run: | if [ "$RUNNER_OS" = "Linux" ]; then sudo apt-get update sudo apt-get install -y pkg-config build-essential elif [ "$RUNNER_OS" = "macOS" ]; then brew install pkg-config else choco install pkgconfiglite -y fi - name: Cache pip uses: actions/cache@v3 with: path: ~/.cache/pip key: ${{ runner.os }}-pip-${{ hashFiles('src/requirements.txt') }} restore-keys: | ${{ runner.os }}-pip- - name: Set up Python dependencies id: deps run: | python -m pip install --upgrade pip pip install -r src/requirements.txt - name: Run tests with coverage run: | pytest --cov=src --cov-report=xml --cov-report=term-missing \ --cov-fail-under=20 src/tests - name: Upload coverage report uses: actions/upload-artifact@v4 with: name: coverage-xml path: coverage.xml