Skip to content

Commit b957525

Browse files
💚 Update workflows (#60)
- 🔥 Drop Python 3.6
1 parent 81fb238 commit b957525

File tree

12 files changed

+146
-231
lines changed

12 files changed

+146
-231
lines changed

.github/FUNDING.yml

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

.github/workflows/codeql-analysis.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ on:
1818
# The branches below must be a subset of the branches above
1919
branches: [ master ]
2020
schedule:
21-
- cron: '39 5 * * 1'
21+
- cron: '45 8 * * 4'
2222

2323
jobs:
2424
analyze:
@@ -33,9 +33,8 @@ jobs:
3333
fail-fast: false
3434
matrix:
3535
language: [ 'python' ]
36-
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
37-
# Learn more:
38-
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
36+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
37+
# Learn more about CodeQL language support at https://git.io/codeql-language-support
3938

4039
steps:
4140
- name: Checkout repository

.github/workflows/pypi.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# This workflow will publish to PyPI
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+
name: Publish to PyPI
5+
6+
on:
7+
release:
8+
types:
9+
- published
10+
11+
jobs:
12+
pypi:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Set up Python
17+
uses: actions/setup-python@v2
18+
with:
19+
python-version: '3.x'
20+
- name: Install dependencies
21+
run: |
22+
pip3 install -U pip setuptools poetry
23+
- name: Build package
24+
run: |
25+
poetry config http-basic.pypi ${{ secrets.PYPI_USER }} ${{ secrets.PYPI_PASS }}
26+
poetry build
27+
- name: Publish package
28+
run: |
29+
poetry publish

.github/workflows/python.yml

Lines changed: 11 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,23 @@ name: Python
66
on:
77
push:
88
branches:
9-
- 'master'
9+
- master
1010
pull_request:
1111
branches:
12-
- 'master'
12+
- master
13+
workflow_dispatch:
14+
15+
concurrency:
16+
group: ${{ github.ref }}
17+
cancel-in-progress: true
1318

1419
jobs:
1520
test:
1621
runs-on: ${{ matrix.os }}
1722
strategy:
18-
fail-fast: false
1923
matrix:
2024
os: [ ubuntu-latest, macos-latest, windows-latest ]
21-
python-version: [ '3.6', '3.7', '3.8', '3.9', '3.10' ]
25+
python-version: [ '3.7', '3.8', '3.9', '3.10' ]
2226
include:
2327
- os: ubuntu-latest
2428
pip-cache: ~/.cache/pip
@@ -62,51 +66,6 @@ jobs:
6266
- name: Test
6367
run: |
6468
make test
65-
- name: Upload Code Coverage
66-
env:
67-
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
68-
run: |
69-
poetry run codecov
70-
71-
testpypi:
72-
needs: [ test ]
73-
if: always() && !(github.ref == 'refs/heads/master' || startsWith(github.head_ref, 'dependabot/pip/') )
74-
runs-on: ubuntu-latest
75-
steps:
76-
- uses: actions/checkout@v2
77-
- name: Set up Python
78-
uses: actions/setup-python@v2
79-
with:
80-
python-version: '3.x'
81-
- name: Install dependencies
82-
run: |
83-
make install-actions
84-
- name: Build package
85-
run: |
86-
poetry config repositories.testpypi https://test.pypi.org/legacy/
87-
poetry config http-basic.testpypi ${{ secrets.TEST_PYPI_USER }} ${{ secrets.TEST_PYPI_PASS }}
88-
poetry build
89-
- name: Publish package
90-
run: |
91-
poetry publish -r testpypi
92-
93-
pypi:
94-
needs: [ test ]
95-
if: always() && github.ref == 'refs/heads/master'
96-
runs-on: ubuntu-latest
97-
steps:
98-
- uses: actions/checkout@v2
99-
- name: Set up Python
100-
uses: actions/setup-python@v2
101-
with:
102-
python-version: '3.x'
103-
- name: Install dependencies
104-
run: |
105-
make install-actions
106-
- name: Build package
107-
run: |
108-
poetry config http-basic.pypi ${{ secrets.PYPI_USER }} ${{ secrets.PYPI_PASS }}
109-
poetry build
110-
- name: Publish package
111-
run: |
112-
poetry publish
69+
- name: Code Coverage
70+
uses: codecov/[email protected]
71+
if: ${{ success() }}

.github/workflows/testpypi.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# This workflow will publish to TestPyPI
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+
name: Publish to TestPyPI
5+
6+
on:
7+
push:
8+
tags:
9+
- '*'
10+
11+
jobs:
12+
testpypi:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Set up Python
17+
uses: actions/setup-python@v2
18+
with:
19+
python-version: '3.x'
20+
- name: Install dependencies
21+
run: |
22+
pip3 install -U pip setuptools poetry
23+
- name: Build package
24+
run: |
25+
poetry config repositories.testpypi https://test.pypi.org/legacy/
26+
poetry config http-basic.testpypi ${{ secrets.TEST_PYPI_USER }} ${{ secrets.TEST_PYPI_PASS }}
27+
poetry build
28+
- name: Publish package
29+
run: |
30+
poetry publish -r testpypi

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2019-2022 Ronie Martinez
3+
Copyright (c) 2019 Ronie Martinez
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

Makefile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
.PHONY: install
22
install:
3-
pip3 install -U pip setuptools wheel poetry
3+
pip3 install -U pip setuptools poetry
44
poetry install
55

66
.PHONY: install-actions
77
install-actions:
8-
pip3 install pip setuptools wheel poetry
8+
pip3 install pip setuptools poetry
99
poetry config virtualenvs.create false
1010
poetry config experimental.new-installer false
1111
poetry install
@@ -35,5 +35,6 @@ setup:
3535

3636
.PHONY: tag
3737
tag:
38-
VERSION=`poetry version | grep -o -E "\d+\.\d+\.\d+"`; \
39-
git tag -s -a $$VERSION -m "Release $$VERSION"
38+
VERSION=`poetry version | grep -o -E "\d+\.\d+\.\d+(-\w+\.\d+)?"`; \
39+
git tag -s -a $$VERSION -m "Release $$VERSION"; \
40+
echo "Tagged $$VERSION";

README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# amortization
2-
3-
Python library for calculating amortizations and generating amortization schedules
41
<table>
52
<tr>
63
<td>License</td>
@@ -28,10 +25,9 @@ Python library for calculating amortizations and generating amortization schedul
2825
</tr>
2926
</table>
3027

31-
## Support
32-
If you like `amortization` or if it is useful to you, show your support by sponsoring my projects.
28+
# amortization
3329

34-
[![Github Sponsors](https://img.shields.io/github/sponsors/roniemartinez?label=github%20sponsors&logo=github%20sponsors&style=for-the-badge)](https://github.com/sponsors/roniemartinez)
30+
Python library for calculating amortizations and generating amortization schedules
3531

3632
## Installation
3733

README.rst

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11

2-
amortization
3-
============
4-
5-
Python library for calculating amortizations and generating amortization schedules
6-
72

83
.. raw:: html
94

@@ -35,16 +30,10 @@ Python library for calculating amortizations and generating amortization schedul
3530
</table>
3631

3732

38-
Support
39-
-------
40-
41-
If you like ``amortization`` or if it is useful to you, show your support by sponsoring my projects.
42-
43-
44-
.. image:: https://img.shields.io/github/sponsors/roniemartinez?label=github%20sponsors&logo=github%20sponsors&style=for-the-badge
45-
:target: https://github.com/sponsors/roniemartinez
46-
:alt: Github Sponsors
33+
amortization
34+
============
4735

36+
Python library for calculating amortizations and generating amortization schedules
4837

4938
Installation
5039
------------

0 commit comments

Comments
 (0)