Skip to content

Commit e1381bd

Browse files
authored
Merge pull request #30 from vkurup/switch-github-actions
Switch GitHub actions
2 parents f11f196 + abc79b2 commit e1381bd

20 files changed

Lines changed: 254 additions & 103 deletions

.coveragerc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
[run]
22
branch = true
33
source = tcxparser
4+
omit = */tests*
45

56
[report]
7+
fail_under = 99
68
show_missing = true
9+
skip_covered = true

.github/workflows/release.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# This workflows will upload a Python Package using Twine when a release is created
2+
# For more information see:
3+
# https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
4+
5+
name: Upload Python Package
6+
7+
on:
8+
release:
9+
types: [created]
10+
11+
jobs:
12+
release:
13+
runs-on: ubuntu-20.04
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
- uses: actions/setup-python@v2
18+
- name: Install dependencies
19+
run: |
20+
python -m pip install --upgrade pip
21+
pip install setuptools wheel twine
22+
- name: Build and publish
23+
env:
24+
TWINE_USERNAME: __token__
25+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
26+
run: |
27+
python setup.py sdist bdist_wheel
28+
twine upload dist/*

.github/workflows/test.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: lint-test
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
schedule:
9+
# run once a week on early monday mornings
10+
- cron: '22 2 * * 1'
11+
12+
jobs:
13+
pre-commit:
14+
runs-on: ubuntu-20.04
15+
steps:
16+
- uses: actions/checkout@v2
17+
- uses: actions/setup-python@v2
18+
- uses: pre-commit/action@v2.0.0
19+
20+
tox:
21+
runs-on: ubuntu-20.04
22+
strategy:
23+
matrix:
24+
# tox-gh-actions will only run the tox environments which match the currently
25+
# running python-version. See [gh-actions] in tox.ini for the mapping
26+
python-version: [3.6, 3.7, 3.8, 3.9]
27+
steps:
28+
- uses: actions/checkout@v2
29+
- name: Set up Python ${{ matrix.python-version }}
30+
uses: actions/setup-python@v2
31+
with:
32+
python-version: ${{ matrix.python-version }}
33+
- name: Cache pip
34+
uses: actions/cache@v2
35+
with:
36+
path: ~/.cache/pip
37+
key: ${{ runner.os }}-pip-${{ hashFiles('dev-requirements.txt') }}
38+
restore-keys: |
39+
${{ runner.os }}-pip-
40+
${{ runner.os }}-
41+
- name: Install dependencies
42+
run: |
43+
python -m pip install --upgrade pip
44+
pip install -r dev-requirements.txt
45+
- name: Test with tox
46+
run: tox

.pre-commit-config.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v3.3.0
4+
hooks:
5+
- id: check-added-large-files
6+
- id: check-case-conflict
7+
- id: check-json
8+
- id: check-merge-conflict
9+
- id: check-symlinks
10+
- id: check-yaml
11+
- id: debug-statements
12+
- id: detect-private-key
13+
- id: end-of-file-fixer
14+
- id: mixed-line-ending
15+
- id: trailing-whitespace
16+
17+
- repo: https://github.com/psf/black
18+
rev: 20.8b1
19+
hooks:
20+
- id: black
21+
22+
- repo: https://github.com/pycqa/isort
23+
rev: 5.6.4
24+
hooks:
25+
- id: isort
26+
27+
- repo: https://gitlab.com/pycqa/flake8
28+
rev: master
29+
hooks:
30+
- id: flake8

.python-version

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
3.9.0
2+
3.8.6
3+
3.7.9
4+
3.6.12

.travis.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

AUTHORS.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@ Other contributions from:
1313
* Stephen Doyle (@stevedoyle)
1414
* Loïs Taulelle (@ltaulell)
1515
* Jan Pipek (@janpipek)
16+
* Kees Hink (@khink)
1617

1718
Thank you!

CHANGES.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
CHANGES
22
=======
33

4+
v2.0.0, 2020-12-20
5+
------------------
6+
7+
* Add command to extract the percentage of workout spent in each HR zone. Thanks @khink (#29)
8+
* Drops support for Python 2.7
9+
10+
411
v1.1.0, 2020-01-10
512
------------------
613

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2013-2020, Vinod Kurup
1+
Copyright (c) 2013-2021, Vinod Kurup
22
All rights reserved.
33

44
Redistribution and use in source and binary forms, with or without modification,

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
include *.txt
22
include *.md
3+
include *.rst

0 commit comments

Comments
 (0)