Skip to content

Commit 3571197

Browse files
committed
Github workflows
1 parent b95c340 commit 3571197

File tree

8 files changed

+170
-54
lines changed

8 files changed

+170
-54
lines changed

.github/release-drafter.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name-template: 'v$RESOLVED_VERSION'
2+
tag-template: 'v$RESOLVED_VERSION'
3+
categories:
4+
-
5+
title: 'Features'
6+
labels:
7+
- 'enhancement'
8+
- 'feat'
9+
- 'feature'
10+
-
11+
title: 'Bug Fixes'
12+
labels:
13+
- 'bug'
14+
- 'bugfix'
15+
- 'fix'
16+
-
17+
title: 'Maintenance'
18+
labels:
19+
- 'chore'
20+
- 'style'
21+
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
22+
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
23+
version-resolver:
24+
major:
25+
labels: ['major']
26+
minor:
27+
labels: ['minor']
28+
patch:
29+
labels: ['patch']
30+
default: patch
31+
exclude-labels: ['skip']
32+
autolabeler:
33+
-
34+
label: 'bug'
35+
branch:
36+
- '/bug\/.+/'
37+
- '/bugfix\/.+/'
38+
- '/fix\/.+/'
39+
-
40+
label: 'enhancement'
41+
branch:
42+
- '/dependabot\/.+/'
43+
- '/enhancement\/.+/'
44+
- '/feat\/.+/'
45+
- '/feature\/.+/'
46+
-
47+
label: 'chore'
48+
branch:
49+
- '/chore\/.+/'
50+
- '/style\/.+/'
51+
template: |
52+
## Release notes
53+
54+
$CHANGES

.github/workflows/pypi.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Publish Python distribution to PyPI
2+
on:
3+
release:
4+
types:
5+
- published
6+
7+
jobs:
8+
build-n-publish:
9+
name: Publish Python distribution to PyPI
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@master
13+
- name: Setup Python 3.8
14+
uses: actions/setup-python@v1
15+
with:
16+
python-version: 3.8
17+
- name: Install pypa/build
18+
run: >-
19+
python -m
20+
pip install
21+
build
22+
--user
23+
- name: Build a binary wheel and a source tarball
24+
run: >-
25+
python -m
26+
build
27+
--sdist
28+
--wheel
29+
--outdir dist/
30+
.
31+
- name: Publish distribution to PyPI
32+
uses: pypa/gh-action-pypi-publish@master
33+
with:
34+
user: __token__
35+
password: ${{ secrets.PYPI_API_TOKEN }}

.github/workflows/python-app.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# This workflow will install Python dependencies, run tests and lint with a single version of Python
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+
name: oidc-op
5+
6+
on:
7+
push:
8+
branches: [ master, develop ]
9+
pull_request:
10+
branches: [ master, develop ]
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
python-version:
21+
- '3.7'
22+
- '3.8'
23+
- '3.9'
24+
25+
steps:
26+
- uses: actions/checkout@v2
27+
- name: Set up Python ${{ matrix.python-version }}
28+
uses: actions/setup-python@v2
29+
with:
30+
python-version: ${{ matrix.python-version }}
31+
- name: Install dependencies
32+
run: |
33+
python -m pip install --upgrade pip
34+
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
35+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
36+
python setup.py install
37+
- name: Lint with flake8
38+
run: |
39+
# stop the build if there are Python syntax errors or undefined names
40+
flake8 src/oidcop --count --select=E9,F63,F7,F82 --show-source --statistics
41+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
42+
flake8 src/oidcop --max-line-length 120 --count --exit-zero --statistics
43+
44+
- name: Test with pytest
45+
run: |
46+
pytest --cov=oidcop tests/
47+
- name: Bandit Security Scan
48+
run: |
49+
bandit --skip B105,B106,B107 -r src/oidcop/
50+
#- name: Upload coverage to Codecov
51+
#uses: codecov/codecov-action@v1
52+
#with:
53+
#token: ${{ secrets.CODECOV_TOKEN }}
54+
#file: example/coverage.xml
55+
#flags: unittests
56+
#env_vars: OS,PYTHON
57+
#name: codecov-umbrella
58+
#fail_ci_if_error: true
59+
#path_to_write_report: ./codecov_report.txt

.github/workflows/release-drafter.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Release drafter
2+
3+
on:
4+
push:
5+
branches: [master, develop]
6+
pull_request:
7+
types: [opened, reopened, synchronize]
8+
9+
jobs:
10+
update_release_draft:
11+
name: Update draft release
12+
runs-on: ubuntu-latest
13+
steps:
14+
-
15+
uses: release-drafter/release-drafter@v5
16+
env:
17+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Pipfile

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

pyproject.toml

Lines changed: 4 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ name = "idpyoidc"
1010
version = "1.0.0"
1111
author = "Roland Hedberg"
1212
author_email = "[email protected]"
13-
description = "Python implementation of everything OAuth2 and OIDC"
13+
description = "Everything OAuth2 and OIDC"
1414
long_description = "file: README.md"
1515
long_description_content_type = "text/markdown"
16-
url = "https://github.com/IdentityPython/idpy-oidc"
16+
url = "https://github.com/IdentityPython/oidc-op"
1717
license = "Apache-2.0"
1818
classifiers =[
1919
"Programming Language :: Python :: 3",
@@ -24,14 +24,14 @@ classifiers =[
2424
[options]
2525
package_dir = "src"
2626
packages = "find:"
27-
python= "^3.7"
27+
python= "^3.6"
2828

2929
[tool.black]
3030
line-length = 100
3131

3232
[tool.isort]
3333
force_single_line = true
34-
known_first_party = "oidcmsg"
34+
known_first_party = "oidcop"
3535
include_trailing_comma = true
3636
force_grid_wrap = 0
3737
use_parentheses = true
@@ -45,38 +45,3 @@ exclude_lines = [
4545
"pragma: no cover",
4646
"raise NotImplementedError",
4747
]
48-
49-
[tool.poetry]
50-
name = "oidcmsg"
51-
version = "1.4.1"
52-
description = "Python implementation of everything OAuth2 and OpenID Connect"
53-
authors = ["roland <[email protected]>"]
54-
license = "Apache 2.0"
55-
repository = "https://github.com/IdentityPython/idpy-oidc"
56-
readme = "README.md"
57-
packages = [
58-
{ include = "idpyoidc", from = "src" }
59-
]
60-
61-
[tool.poetry.dependencies]
62-
python = "^3.7"
63-
filelock = "^3.0.12"
64-
cryptojwt = "^1.6.1"
65-
66-
[tool.poetry.dev-dependencies]
67-
alabaster = "^0.7.12"
68-
black = "^20.8b1"
69-
isort = "^5.6.4"
70-
pytest = "^6.1.2"
71-
pytest-black = "^0.3.12"
72-
pytest-isort = "^1.2.0"
73-
responses = "^0.13.0"
74-
sphinx = "^3.5.2"
75-
sphinx-autobuild = "^2021.3.14"
76-
pytest-cov = "^2.11.1"
77-
codecov = "^2.1.11"
78-
coverage = "^5.5"
79-
80-
[build-system]
81-
requires = ["poetry-core>=1.0.0"]
82-
build-backend = "poetry.core.masonry.api"

setup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,5 +86,4 @@ def run_tests(self):
8686
],
8787
zip_safe=False,
8888
cmdclass={'test': PyTest},
89-
scripts=['tools/create_jwks.py']
9089
)

tests/private/token_jwks.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"keys": [{"kty": "oct", "use": "enc", "kid": "code", "k": "HQ45GyAUB6_Ie43tlaSWn19iKBDEGQpS"}]}
1+
{"keys": [{"kty": "oct", "use": "enc", "kid": "code", "k": "e92F2hf7hu4RYOijG8ZHYwbZ4A2V4LnW"}]}

0 commit comments

Comments
 (0)