-
Notifications
You must be signed in to change notification settings - Fork 27
101 lines (99 loc) · 3 KB
/
test.yml
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
name: Lint and Test
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox
- name: Run Tox lint
run: |
tox -e lint
test:
name: Tox Tests
needs: lint
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions
- name: Test with tox
run: tox
- name: Convert coverage to LCOV format
if: matrix.python-version == '3.11'
run: tox -e coverage
- name: Upload coverage in Parallel
if: matrix.python-version == '3.11'
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
flag-name: run-${{ matrix.os }}-${{ matrix.python-version }}
path-to-lcov: ${{ github.workspace }}/lcov.info
parallel: true
auth:
name: Authenticated Tests
needs: test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox
- name: Run Authenticated tests
run: |
tox -e py311,auth
env:
TOKENDITO_OKTA_USERNAME: ${{ secrets.TOXTEST_OKTA_USERNAME }}
TOKENDITO_OKTA_PASSWORD: ${{ secrets.TOXTEST_OKTA_PASSWORD }}
TOKENDITO_OKTA_MFA: ${{ secrets.TOXTEST_MFA }}
TOKENDITO_OKTA_MFA_RESPONSE: ${{ secrets.TOXTEST_MFA_RESPONSE }}
TOKENDITO_OKTA_TILE: ${{ secrets.TOXTEST_OKTA_TILE }}
TOKENDITO_AWS_ROLE_ARN: ${{ secrets.TOXTEST_ROLE_ARN }}
- name: Generate Coverage reports
run: |
tox -e coverage
- name: Upload Coverage for auth tests
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
path-to-lcov: ${{ github.workspace }}/lcov.info
flag-name: run-3.x-auth
parallel: true
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
path-to-lcov: ${{ github.workspace }}/lcov.info
parallel-finished: true