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

Commit 2408c7b

Browse files
authored
Create python-ci.yml
1 parent 45cdcb1 commit 2408c7b

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

.github/workflows/python-ci.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: oidcmsg
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/oidcmsg --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/oidcmsg --max-line-length 120 --count --exit-zero --statistics
43+
44+
- name: Test with pytest
45+
run: |
46+
pytest --cov=oidcmsg 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

0 commit comments

Comments
 (0)