Skip to content

Commit

Permalink
Add Travis and GitHub Actions configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
khaeru committed Apr 4, 2020
1 parent 1bf07c1 commit 6161112
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/test.yml
@@ -0,0 +1,31 @@
name: Python package

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
- name: Upgrade pip
run: python -m pip install --upgrade pip
- name: Lint with flake8
run: |
pip install flake8
find . -name "*.py" | flake8 --count --max-complexity=5 \
--show-source --statistics
- name: Install and test with pytest
run: |
pip install pytest setuptools-scm
pip install --editable .
pytest --verbose
- name: Test package build
run: |
pip install twine
python3 setup.py bdist_wheel sdist
twine check dist/*
16 changes: 16 additions & 0 deletions .travis.yml
@@ -0,0 +1,16 @@
os: linux
dist: bionic
language: python

python: 3.8

install:
- pip install flake8 setuptools-scm twine
- pip install --editable .

script:
- pytest --verbose
# Check code style
- flake8 iam_units/*.py
# Test package build
- python3 setup.py bdist_wheel sdist && twine check dist/*
14 changes: 14 additions & 0 deletions DEVELOPING.rst
@@ -1,6 +1,20 @@
Development notes
*****************

The repository and package aim to be ruthlessly simple, and thus as easy as possible to maintain.
Thus:

- No built documentation; like `pycountry <https://pypi.org/project/pycountry/>`_, the README *is* the documentation.
- Actual code (in \_\_init\_\_.py) kept to a minimum.
- `setuptools-scm <https://pypi.org/project/setuptools-scm/>`_ and git tags used for all versioning.
- Minimal CI configuration: one service/OS/Python version.


Versioning
==========
Similar to pycountry: ``<YYYY>.<M>.<D>``.


Test the package build
======================

Expand Down

0 comments on commit 6161112

Please sign in to comment.