File tree Expand file tree Collapse file tree 4 files changed +29
-9
lines changed Expand file tree Collapse file tree 4 files changed +29
-9
lines changed Original file line number Diff line number Diff line change 11name : Pytest
22
33on :
4- - push
5- - pull_request
4+ pull_request :
5+ push :
6+ branches :
7+ - " main"
68
79jobs :
810 pytest :
911 runs-on : ubuntu-latest
12+ permissions :
13+ # Gives the action the necessary permissions for publishing new
14+ # comments in pull requests.
15+ pull-requests : write
16+ # Gives the action the necessary permissions for pushing data to the
17+ # python-coverage-comment-action branch, and for editing existing
18+ # comments (to avoid publishing multiple comments in the same PR)
19+ contents : write
1020 steps :
1121 - name : Check out code
1222 uses : actions/checkout@v3
2838 - name : Run tests
2939 run : ./tests/run.sh
3040
31- - name : Upload coverage report
32- uses : actions/upload-artifact @v3
41+ - name : Coverage comment
42+ uses : py-cov-action/python-coverage-comment-action @v3
3343 with :
34- name : coverage-report
35- path : ./tests/coverage
44+ GITHUB_TOKEN : ${{ github.token }}
45+ MINIMUM_GREEN : 90
46+ MINIMUM_ORANGE : 80
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ keywords = ["gam", "google"]
99authors = [
1010 { name = " Compiler LLC" , email = " dev@compiler.la" }
1111]
12- requires-python = " >=3.9 "
12+ requires-python = " >=3.11 "
1313dependencies = [
1414 " advanced-gam-for-google-workspace @ git+https://github.com/taers232c/GAMADV-XTD3.git@v6.61.14#subdirectory=src"
1515]
@@ -26,8 +26,8 @@ dev = [
2626 " pre-commit"
2727]
2828test = [
29+ " coverage" ,
2930 " pytest" ,
30- " pytest-cov" ,
3131 " pytest-mock"
3232]
3333
@@ -43,6 +43,11 @@ line-length = 127
4343target-version = [' py311' ]
4444include = ' \.pyi?$'
4545
46+ [tool .coverage .run ]
47+ branch = true
48+ relative_files = true
49+ source = [" compiler_admin" ]
50+
4651[tool .pyright ]
4752include = [" compiler_admin" , " tests" ]
4853
Original file line number Diff line number Diff line change 22set -eu
33
44# run normal pytests, skip e2e tests
5- pytest -m " not e2e" --cov=compiler_admin --cov-branch --import-mode=importlib
5+ coverage run -m pytest -m " not e2e"
66
77# clean out old coverage results
88rm -rf ./tests/coverage
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ set -eu
3+
4+ python -m http.server -d ./tests/coverage
You can’t perform that action at this time.
0 commit comments