forked from gammu/python-gammu
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (45 loc) · 1.59 KB
/
test.yml
File metadata and controls
48 lines (45 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Test
on: [push, pull_request]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python-version: [3.6, 3.7, 3.8, 3.9]
name: ${{ matrix.os }}, Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v2
- name: Cache pip
uses: actions/cache@v2.1.6
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@v2.2.2
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@v2.0.2
with:
name: ${{ matrix.os }}, Python ${{ matrix.python-version }}