Merge pull request #89 from dennissiemensma/feature/github-actions-with-fixes

Replace Travis with GitHub Actions (+ minor fixes)
This commit is contained in:
Nigel Dokter 2021-11-14 21:08:09 +01:00 committed by GitHub
commit 3a4fcd7da1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 47 additions and 26 deletions

45
.github/workflows/tests.yml vendored Normal file
View File

@ -0,0 +1,45 @@
name: Tests
on:
push: ~
pull_request: ~
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 10 # Don't run forever when stale
strategy:
matrix:
python-version:
- 3.6
- 3.7
- 3.8
- 3.9
name: Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v2
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Cached PIP dependencies
uses: actions/cache@v2
with:
path: |
~/.cache/pip
~/.tox/python/.pytest_cache
key: pip-${{ matrix.python-version }}-${{ hashFiles('setup.py', 'tox.ini') }}
restore-keys: pip-${{ matrix.python-version }}-
- name: Install dependencies
run: pip install tox
- name: Run tests
run: tox
- name: Code coverage upload
uses: codecov/codecov-action@v1

View File

@ -1,18 +0,0 @@
language: python
python:
- 2.7
- 3.5
- 3.6
- 3.8
install: pip install tox-travis codecov
script: tox
after_success:
- codecov
matrix:
allow_failures:
- python: 2.7

View File

@ -1,4 +1,3 @@
import asyncio
import logging
import serial
import serial_asyncio

View File

@ -157,7 +157,8 @@ LUXEMBOURG_SMARTY['objects'].update({
obis.LUXEMBOURG_ELECTRICITY_DELIVERED_TARIFF_GLOBAL: CosemParser(ValueParser(Decimal)),
})
# Source: https://www.energiforetagen.se/globalassets/energiforetagen/det-erbjuder-vi/kurser-och-konferenser/elnat/branschrekommendation-lokalt-granssnitt-v2_0-201912.pdf
# Source: https://www.energiforetagen.se/globalassets/energiforetagen/det-erbjuder-vi/kurser-och-konferenser/elnat/
# branschrekommendation-lokalt-granssnitt-v2_0-201912.pdf
SWEDEN = {
'checksum_support': True,
'objects': {

View File

@ -3,8 +3,6 @@ from unittest.mock import Mock
import unittest
from dsmr_parser import obis_references as obis
from dsmr_parser import telegram_specifications
from dsmr_parser.parsers import TelegramParser
from dsmr_parser.clients.protocol import create_dsmr_protocol

View File

@ -1,13 +1,9 @@
[tox]
envlist = py35,py36,py37,py38,py39
[testenv]
deps=
pytest
pytest-cov
pylama
pytest-asyncio
pytest-catchlog
pytest-mock
commands=
py.test --cov=dsmr_parser test {posargs}