-
Notifications
You must be signed in to change notification settings - Fork 319
74 lines (73 loc) · 2.7 KB
/
coverage.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
name: Coverage
on:
push:
branches:
- main
pull_request:
schedule:
- cron: 0 0 * * *
jobs:
Coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Python environment
uses: actions/setup-python@v3.1.4
with:
python-version: '3.7'
- name: Install Requirements
run: |
python -m pip install --upgrade pip
pip install coverage pytest
pip install -r requirements.txt
pip install -r test/requirements.txt
python setup.py install
- name: Generate Unit Test Coverage
run: |
coverage run --rcfile=.coveragerc -m pytest test/unit/test_dropbox_unit.py
coverage xml
- name: Publish Coverage
uses: codecov/codecov-action@v3.1.6
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unit
fail_ci_if_error: true
IntegrationCoverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Python environment
uses: actions/setup-python@v3.1.4
with:
python-version: '3.7'
- name: Install Requirements
run: |
python -m pip install --upgrade pip
pip install coverage pytest
pip install -r requirements.txt
pip install -r test/requirements.txt
python setup.py install
- name: Generate Unit Test Coverage
env:
LEGACY_USER_DROPBOX_TOKEN: ${{ secrets.LEGACY_USER_DROPBOX_TOKEN }}
LEGACY_USER_CLIENT_ID: ${{ secrets.LEGACY_USER_CLIENT_ID }}
LEGACY_USER_CLIENT_SECRET: ${{ secrets.LEGACY_USER_CLIENT_SECRET }}
LEGACY_USER_REFRESH_TOKEN: ${{ secrets.LEGACY_USER_REFRESH_TOKEN }}
SCOPED_USER_DROPBOX_TOKEN: ${{ secrets.SCOPED_USER_DROPBOX_TOKEN }}
SCOPED_USER_CLIENT_ID: ${{ secrets.SCOPED_USER_CLIENT_ID }}
SCOPED_USER_CLIENT_SECRET: ${{ secrets.SCOPED_USER_CLIENT_SECRET }}
SCOPED_USER_REFRESH_TOKEN: ${{ secrets.SCOPED_USER_REFRESH_TOKEN }}
SCOPED_TEAM_DROPBOX_TOKEN: ${{ secrets.SCOPED_TEAM_DROPBOX_TOKEN }}
SCOPED_TEAM_CLIENT_ID: ${{ secrets.SCOPED_TEAM_CLIENT_ID }}
SCOPED_TEAM_CLIENT_SECRET: ${{ secrets.SCOPED_TEAM_CLIENT_SECRET }}
SCOPED_TEAM_REFRESH_TOKEN: ${{ secrets.SCOPED_TEAM_REFRESH_TOKEN }}
DROPBOX_SHARED_LINK: ${{ secrets.DROPBOX_SHARED_LINK }}
run: |
coverage run --rcfile=.coveragerc -m pytest test/integration/test_dropbox.py
coverage xml
- name: Publish Coverage
uses: codecov/codecov-action@v3.1.6
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: integration
fail_ci_if_error: true