File tree Expand file tree Collapse file tree 4 files changed +18
-17
lines changed Expand file tree Collapse file tree 4 files changed +18
-17
lines changed Original file line number Diff line number Diff line change 99
1010jobs :
1111 publish :
12- uses : ./.github/workflows/.nox-session .yml
12+ uses : ./.github/workflows/.hatch-run .yml
1313 with :
1414 job-name : " publish"
15- nox-args : " -s publish"
15+ hatch-run : " publish"
1616 secrets :
1717 node-auth-token : ${{ secrets.NODE_AUTH_TOKEN }}
1818 pypi-username : ${{ secrets.PYPI_USERNAME }}
Original file line number Diff line number Diff line change @@ -15,23 +15,21 @@ jobs:
1515 uses : ./.github/workflows/.hatch-run.yml
1616 with :
1717 job-name : " python-{0}"
18- hatch-run : " -t check-python"
19- nox-session-args : " --pytest --maxfail=3 --reruns 3"
18+ hatch-run : " test-py --maxfail=3 --reruns=3 lint-py"
2019 python-environments :
21- uses : ./.github/workflows/.nox-session .yml
20+ uses : ./.github/workflows/.hatch-run .yml
2221 with :
2322 job-name : " python-{0} {1}"
24- nox-args : " -s check-python-tests"
25- nox-session-args : " --no-cov --pytest --maxfail=3 --reruns 3"
23+ hatch-run : " test-py --maxfail=3 --reruns=3 --no-cov"
2624 runs-on-array : ' ["ubuntu-latest", "macos-latest", "windows-latest"]'
2725 python-version-array : ' ["3.9", "3.10", "3.11"]'
2826 docs :
29- uses : ./.github/workflows/.nox-session .yml
27+ uses : ./.github/workflows/.hatch-run .yml
3028 with :
3129 job-name : " python-{0}"
32- nox-args : " -s check -docs"
30+ hatch-run : " test -docs"
3331 javascript :
34- uses : ./.github/workflows/.nox-session .yml
32+ uses : ./.github/workflows/.hatch-run .yml
3533 with :
3634 job-name : " {1}"
37- nox-args : " -t check-javascript "
35+ hatch-run : " test-js lint-js "
Original file line number Diff line number Diff line change @@ -14,15 +14,12 @@ post-install-commands = ["invoke env"]
1414[tool .hatch .envs .default .scripts ]
1515publish = " invoke publish {args}"
1616
17- checks = [" lint" , " test" ]
18- lint = [" lint-py {args}" , " lint-js {args}" ]
19- test = [" test-py" , " test-js" ]
20-
2117lint-py = " invoke lint-py {args}"
2218lint-js = " invoke lint-js {args}"
2319
2420test-py = " invoke test-py {args}"
2521test-js = " invoke test-js {args}"
22+ test-docs = " invoke test-docs {args}"
2623
2724# --- Black ----------------------------------------------------------------------------
2825
Original file line number Diff line number Diff line change @@ -83,9 +83,10 @@ def lint_js(context: Context, fix: bool = False):
8383
8484
8585@task
86- def test_py (context : Context , no_cov : bool = False ):
86+ def test_py (context : Context , no_cov : bool = False , ** flags : str ):
8787 """Run test suites"""
88- in_py (context , f"hatch run { 'test' if no_cov else 'cov' } " )
88+ flags = " " .join (f"--{ k } ={ v } " for k , v in flags .items ())
89+ in_py (context , f"hatch run { 'test' if no_cov else 'cov' } { flags } " )
8990
9091
9192@task
@@ -94,6 +95,11 @@ def test_js(context: Context):
9495 in_js (context , "npm run check:tests" )
9596
9697
98+ @task
99+ def test_docs (context : Context ):
100+ raise Exit ("Not implemented" )
101+
102+
97103@task
98104def publish (context : Context , dry_run : str = "" ):
99105 """Publish packages that have been tagged for release in the current commit
You can’t perform that action at this time.
0 commit comments