Skip to content
This repository was archived by the owner on Jun 23, 2023. It is now read-only.

Commit c3f9d27

Browse files
committed
fix: CI - release-drafter also in master branch
1 parent a197211 commit c3f9d27

3 files changed

Lines changed: 130 additions & 0 deletions

File tree

.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/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
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, main, 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 }}

0 commit comments

Comments
 (0)