Skip to content

[pre-commit.ci] pre-commit autoupdate #383

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #383

Workflow file for this run

name: Test
on: [push, pull_request]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python-version:
- "3.7"
- "3.8"
- "3.9"
- "3.10"
- "3.11"
name: ${{ matrix.os }}, Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v4
- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/requirements*.txt') }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install gammu
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
sudo apt-get update
sudo apt-get install -y libgammu-dev libdbd-sqlite3
- name: Install Gammu
if: ${{ matrix.os == 'windows-latest' }}
run: |
C:/msys64/usr/bin/wget.exe -O gammu-setup.exe https://dl.cihar.com/gammu/releases/windows/Gammu-1.41.0-Windows-64bit.exe
./gammu-setup.exe /S /D=C:/Gammu
- name: Install pip dependencies
run: |
python -m pip install --upgrade pip wheel
pip install -r requirements-test.txt
- name: Build
shell: bash
run: CFLAGS="-Wall -Wextra" ./setup.py build
- name: Test
run: coverage run --source=. ./setup.py test
- name: Coverage
run: coverage xml
- uses: codecov/codecov-action@v4
with:
name: ${{ matrix.os }}, Python ${{ matrix.python-version }}