File tree Expand file tree Collapse file tree 5 files changed +50
-13
lines changed
Expand file tree Collapse file tree 5 files changed +50
-13
lines changed Original file line number Diff line number Diff line change 11# Changes here will be overwritten by Copier
2- _commit : 42e01c1
2+ _commit : b569c29
33_src_path : https://github.com/python-project-templates/base.git
44add_extension : js
55email : 3105306+timkpaine@users.noreply.github.com
Original file line number Diff line number Diff line change @@ -14,3 +14,12 @@ updates:
1414 labels :
1515 - " lang: python"
1616 - " part: dependencies"
17+
18+ - package-ecosystem : " npm"
19+ directory : " /js"
20+ schedule :
21+ interval : " monthly"
22+ labels :
23+ - " lang: javascript"
24+ - " part: dependencies"
25+
Original file line number Diff line number Diff line change 1-
21name : Build Status
32
43on :
4443 cache : ' pip'
4544 cache-dependency-path : ' pyproject.toml'
4645
46+ - name : Use Node.js ${{ matrix.node-version }}
47+ uses : actions/setup-node@v4
48+ with :
49+ node-version : ${{ matrix.node-version }}
50+
4751 - name : Install pnpm
4852 uses : pnpm/action-setup@v4
4953 with :
@@ -55,18 +59,18 @@ jobs:
5559
5660 - name : Lint
5761 run : make lint
58- if : ${{ matrix.os == 'ubuntu-latest' }}
62+ if : matrix.os == 'ubuntu-latest'
5963
6064 - name : Checks
6165 run : make checks
62- if : ${{ matrix.os == 'ubuntu-latest' }}
66+ if : matrix.os == 'ubuntu-latest'
6367
6468 - name : Build
6569 run : make build
6670
6771 - name : Test
6872 run : make coverage
69- if : ${{ matrix.os == 'ubuntu-latest' }}
73+ if : matrix.os == 'ubuntu-latest'
7074
7175 - name : Upload test results
7276 uses : actions/upload-artifact@v4
@@ -81,12 +85,21 @@ jobs:
8185 with :
8286 files : |
8387 **/junit.xml
84- if : ${{ matrix.os == 'ubuntu-latest' }}
88+ if : matrix.os == 'ubuntu-latest'
8589
8690 - name : Upload coverage
8791 uses : codecov/codecov-action@v4
92+ with :
93+ token : ${{ secrets.CODECOV_TOKEN }}
8894
8995 - name : Make dist
9096 run : make dist
91- if : ${{ matrix.os == 'ubuntu-latest' }}
97+ if : matrix.os == 'ubuntu-latest'
98+
99+ - uses : actions/upload-artifact@v4
100+ with :
101+ name : dist-${{matrix.os}}
102+ path : dist
103+ if : matrix.os == 'ubuntu-latest'
104+
92105
Original file line number Diff line number Diff line change @@ -73,13 +73,13 @@ annotate: ## run python type annotation checks with mypy
7373# ########
7474.PHONY : test-py tests-py coverage-py
7575test-py : # # run python tests
76- python -m pytest -v js_template/tests --junitxml=junit.xml
76+ python -m pytest -v js_template/tests
7777
7878# alias
7979tests-py : test-py
8080
8181coverage-py : # # run python tests and collect test coverage
82- python -m pytest -v js_template/tests --junitxml=junit.xml -- cov=js_template --cov-branch --cov-fail-under=50 --cov-report term-missing --cov-report xml
82+ python -m pytest -v js_template/tests --cov=js_template --cov-report term-missing --cov-report xml
8383
8484.PHONY : test-js tests-js coverage-js
8585test-js : # # run js tests
@@ -117,18 +117,18 @@ major: ## bump a major version
117117# #######
118118# DIST #
119119# #######
120- .PHONY : dist dist-build dist-sdist dist-local-wheel publish
120+ .PHONY : dist dist-py dist-js dist-check publish
121121
122- dist-build- py : # build python dists
122+ dist-py : # build python dists
123123 python -m build -w -s
124124
125- dist-build- js : # build js dists
125+ dist-js : # build js dists
126126 cd js; pnpm pack
127127
128128dist-check : # # run python dist checker with twine
129129 python -m twine check dist/*
130130
131- dist : clean build dist-build- js dist-build -py dist-check # # build all dists
131+ dist : clean build dist-js dist-py dist-check # # build all dists
132132
133133publish : dist # publish python assets
134134
Original file line number Diff line number Diff line change @@ -78,6 +78,20 @@ ignore = [
7878 " js_template/**/*" ,
7979]
8080
81+ [tool .coverage .run ]
82+ branch = true
83+ omit = [
84+ " js_template/tests/integration/" ,
85+ ]
86+ [tool .coverage .report ]
87+ exclude_also = [
88+ " raise NotImplementedError" ,
89+ " if __name__ == .__main__.:" ,
90+ " @(abc\\ .)?abstractmethod" ,
91+ ]
92+ ignore_errors = true
93+ fail_under = 50
94+
8195[tool .hatch .build ]
8296artifacts = [
8397 " js_template/extension" ,
@@ -132,6 +146,7 @@ build_cmd = "build"
132146npm = " pnpm"
133147
134148[tool .pytest .ini_options ]
149+ addopts = [" -vvv" , " --junitxml=junit.xml" ]
135150asyncio_mode = " strict"
136151testpaths = " js_template/tests"
137152
You can’t perform that action at this time.
0 commit comments