2828 - { python: "3.11", os: "ubuntu-latest", session: "xdoctest" }
2929 - { python: "3.11", os: "ubuntu-latest", session: "docs-build" }
3030
31- env :
32- NOXSESSION : ${{ matrix.session }}
33-
3431 steps :
3532 - name : Check out the repository
3633 uses : actions/checkout@v3
@@ -45,16 +42,10 @@ jobs:
4542 pip install --constraint=.github/workflows/constraints.txt pip
4643 pip --version
4744
48- - name : Install Poetry
49- run : |
50- pipx install --pip-args=--constraint=.github/workflows/poetry-constraints.txt poetry
51- poetry --version
52-
53- - name : Install Nox
45+ - name : Install Hatch
5446 run : |
55- pipx install --pip-args=--constraint=.github/workflows/constraints.txt nox
56- pipx inject --pip-args=--constraint=.github/workflows/constraints.txt nox nox-poetry
57- nox --version
47+ pipx install --pip-args=--constraint=.github/workflows/hatch-constraints.txt hatch
48+ hatch --version
5849
5950 - name : Compute pre-commit cache key
6051 if : matrix.session == 'pre-commit'
@@ -80,12 +71,12 @@ jobs:
8071 restore-keys : |
8172 ${{ steps.pre-commit-cache.outputs.result }}-
8273
83- - name : Run Nox
74+ - name : Run Hatch
8475 run : |
85- nox --force-color -- python=${{ matrix.python }}
76+ hatch run + python=${{ matrix.python }} sessions:run-${{ matrix.session }}
8677
8778 - name : Upload coverage data
88- if : always() && matrix.session == 'tests'
79+ if : always() && matrix.session == 'tests' && matrix.os == 'ubuntu-latest'
8980 uses : " actions/upload-artifact@v3"
9081 with :
9182 name : coverage-data
@@ -115,16 +106,10 @@ jobs:
115106 pip install --constraint=.github/workflows/constraints.txt pip
116107 pip --version
117108
118- - name : Install Poetry
119- run : |
120- pipx install --pip-args=--constraint=.github/workflows/poetry-constraints.txt poetry
121- poetry --version
122-
123- - name : Install Nox
109+ - name : Install Hatch
124110 run : |
125- pipx install --pip-args=--constraint=.github/workflows/constraints.txt nox
126- pipx inject --pip-args=--constraint=.github/workflows/constraints.txt nox nox-poetry
127- nox --version
111+ pipx install --pip-args=--constraint=.github/workflows/hatch-constraints.txt hatch
112+ hatch --version
128113
129114 - name : Download coverage data
130115 uses : actions/download-artifact@v3
@@ -133,11 +118,11 @@ jobs:
133118
134119 - name : Combine coverage data and display human readable report
135120 run : |
136- nox --force-color --session= coverage
121+ hatch run coverage:run
137122
138123 - name : Create coverage report
139124 run : |
140- nox --force-color --session= coverage -- xml
125+ hatch run coverage:run- xml
141126
142127 - name : Upload coverage report
143128 uses : codecov/codecov-action@v3
0 commit comments