Skip to content

Commit 81504e8

Browse files
committed
ci: fix coverage
Signed-off-by: Zxilly <zhouxinyu1001@gmail.com>
1 parent 7b2aa1f commit 81504e8

3 files changed

Lines changed: 21 additions & 13 deletions

File tree

.github/workflows/coverage.yml

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,32 @@ name: Test Coveralls
55
jobs:
66

77
build:
8-
name: Build
8+
name: Coverage
99
runs-on: ubuntu-latest
1010
steps:
1111

1212
- uses: actions/checkout@v1
1313

14-
- name: Use Node.js 10.x
15-
uses: actions/setup-node@v1
14+
- uses: actions/setup-python@v2
1615
with:
17-
node-version: 10.x
16+
python-version: '3.9'
17+
architecture: 'x64'
1818

19-
- name: npm install, make test-coverage
19+
20+
- name: Install Dependency
2021
run: |
21-
npm install
22-
make test-coverage
22+
python -m pip install -r dev-requirements.txt
23+
python -m pip install coveralls
2324
24-
- name: Coveralls
25-
uses: coverallsapp/github-action@master
26-
with:
27-
github-token: ${{ secrets.GITHUB_TOKEN }}
25+
- name: Run Coverage
26+
run: |
27+
python -m pytest --cov=fastapi_authz tests/
28+
coveralls --service=github
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
32+
# - name: Coveralls
33+
# uses: coverallsapp/github-action@master
34+
# with:
35+
# github-token: ${{ secrets.GITHUB_TOKEN }}
36+
# path-to-lcov: ${{ github.workspace }}/.coverage

dev-requirements.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ casbin
33
pytest
44
pip-tools
55
pytest-cov
6-
coverage
76
bumpversion
87
uvicorn
98
starlette-auth-toolkit

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
"permission"
6262
],
6363
packages=find_packages(exclude=["docs", "test*"]),
64-
data_files=[desc_file,"requirements.txt"],
64+
data_files=[desc_file, "requirements.txt"],
6565
include_package_data=True,
6666
install_requires=install_requires,
6767
dependency_links=dependency_links

0 commit comments

Comments
 (0)