Merge pull request #89 from dennissiemensma/feature/github-actions-with-fixes
Replace Travis with GitHub Actions (+ minor fixes)
This commit is contained in:
commit
3a4fcd7da1
45
.github/workflows/tests.yml
vendored
Normal file
45
.github/workflows/tests.yml
vendored
Normal 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
|
18
.travis.yml
18
.travis.yml
@ -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
|
|
@ -1,4 +1,3 @@
|
|||||||
import asyncio
|
|
||||||
import logging
|
import logging
|
||||||
import serial
|
import serial
|
||||||
import serial_asyncio
|
import serial_asyncio
|
||||||
|
@ -157,7 +157,8 @@ LUXEMBOURG_SMARTY['objects'].update({
|
|||||||
obis.LUXEMBOURG_ELECTRICITY_DELIVERED_TARIFF_GLOBAL: CosemParser(ValueParser(Decimal)),
|
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 = {
|
SWEDEN = {
|
||||||
'checksum_support': True,
|
'checksum_support': True,
|
||||||
'objects': {
|
'objects': {
|
||||||
|
@ -3,8 +3,6 @@ from unittest.mock import Mock
|
|||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from dsmr_parser import obis_references as obis
|
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
|
from dsmr_parser.clients.protocol import create_dsmr_protocol
|
||||||
|
|
||||||
|
|
||||||
|
4
tox.ini
4
tox.ini
@ -1,13 +1,9 @@
|
|||||||
[tox]
|
|
||||||
envlist = py35,py36,py37,py38,py39
|
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
deps=
|
deps=
|
||||||
pytest
|
pytest
|
||||||
pytest-cov
|
pytest-cov
|
||||||
pylama
|
pylama
|
||||||
pytest-asyncio
|
pytest-asyncio
|
||||||
pytest-catchlog
|
|
||||||
pytest-mock
|
pytest-mock
|
||||||
commands=
|
commands=
|
||||||
py.test --cov=dsmr_parser test {posargs}
|
py.test --cov=dsmr_parser test {posargs}
|
||||||
|
Loading…
Reference in New Issue
Block a user