File tree 5 files changed +20
-19
lines changed
5 files changed +20
-19
lines changed Original file line number Diff line number Diff line change 46
46
with :
47
47
python-version : ${{ matrix.python-version }}
48
48
- name : Install Python Dependencies
49
- run : pip install -r requirements/nox-deps.txt
50
- - name : Run Sessions
49
+ run : pip install hatch
50
+ - name : Run Scripts
51
51
env :
52
52
NODE_AUTH_TOKEN : ${{ secrets.node-auth-token }}
53
53
PYPI_USERNAME : ${{ secrets.pypi-username }}
Original file line number Diff line number Diff line change 9
9
10
10
jobs :
11
11
publish :
12
- uses : ./.github/workflows/.nox-session .yml
12
+ uses : ./.github/workflows/.hatch-run .yml
13
13
with :
14
14
job-name : " publish"
15
- nox-args : " -s publish"
15
+ hatch-run : " publish"
16
16
secrets :
17
17
node-auth-token : ${{ secrets.NODE_AUTH_TOKEN }}
18
18
pypi-username : ${{ secrets.PYPI_USERNAME }}
Original file line number Diff line number Diff line change @@ -15,23 +15,21 @@ jobs:
15
15
uses : ./.github/workflows/.hatch-run.yml
16
16
with :
17
17
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"
20
19
python-environments :
21
- uses : ./.github/workflows/.nox-session .yml
20
+ uses : ./.github/workflows/.hatch-run .yml
22
21
with :
23
22
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"
26
24
runs-on-array : ' ["ubuntu-latest", "macos-latest", "windows-latest"]'
27
25
python-version-array : ' ["3.9", "3.10", "3.11"]'
28
26
docs :
29
- uses : ./.github/workflows/.nox-session .yml
27
+ uses : ./.github/workflows/.hatch-run .yml
30
28
with :
31
29
job-name : " python-{0}"
32
- nox-args : " -s check -docs"
30
+ hatch-run : " test -docs"
33
31
javascript :
34
- uses : ./.github/workflows/.nox-session .yml
32
+ uses : ./.github/workflows/.hatch-run .yml
35
33
with :
36
34
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"]
14
14
[tool .hatch .envs .default .scripts ]
15
15
publish = " invoke publish {args}"
16
16
17
- checks = [" lint" , " test" ]
18
- lint = [" lint-py {args}" , " lint-js {args}" ]
19
- test = [" test-py" , " test-js" ]
20
-
21
17
lint-py = " invoke lint-py {args}"
22
18
lint-js = " invoke lint-js {args}"
23
19
24
20
test-py = " invoke test-py {args}"
25
21
test-js = " invoke test-js {args}"
22
+ test-docs = " invoke test-docs {args}"
26
23
27
24
# --- Black ----------------------------------------------------------------------------
28
25
Original file line number Diff line number Diff line change @@ -83,9 +83,10 @@ def lint_js(context: Context, fix: bool = False):
83
83
84
84
85
85
@task
86
- def test_py (context : Context , no_cov : bool = False ):
86
+ def test_py (context : Context , no_cov : bool = False , ** flags : str ):
87
87
"""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 } " )
89
90
90
91
91
92
@task
@@ -94,6 +95,11 @@ def test_js(context: Context):
94
95
in_js (context , "npm run check:tests" )
95
96
96
97
98
+ @task
99
+ def test_docs (context : Context ):
100
+ raise Exit ("Not implemented" )
101
+
102
+
97
103
@task
98
104
def publish (context : Context , dry_run : str = "" ):
99
105
"""Publish packages that have been tagged for release in the current commit
You can’t perform that action at this time.
0 commit comments