forked from duosecurity/duo_universal_python
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (38 loc) · 1.14 KB
/
python-ci.yml
File metadata and controls
41 lines (38 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Python CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9, '3.10']
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Dependencies
run: |
pip install .
pip install -r tests/requirements.txt
- name: Lint with flake8
run: flake8
- name: Test with Python3
working-directory: tests
run: python3 -m unittest
- name: Demo dependencies
working-directory: demo
run: pip install -r requirements.txt
- name: Inject dummy example config
working-directory: demo
run: printf "[duo]\nclient_id=DIAAAAAAAAAAAAAAAAAA\nclient_secret=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\napi_hostname=example.duosecurity.com\nredirect_uri=http://localhost:8080\nfailmode=closed\n" > ./duo.conf
- name: Verify flask can load demo
working-directory: demo
run: flask routes