Skip to content

Commit 70c4476

Browse files
author
Mike
committed
Hatch
1 parent 8a5890b commit 70c4476

2 files changed

Lines changed: 23 additions & 13 deletions

File tree

.github/workflows/publish.yaml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010

1111
steps:
1212
- uses: actions/checkout@v3
13-
- name: Get history and tags for SCM versioning to work
13+
- name: Get history and tags for versioning to work
1414
run: |
1515
git fetch --prune --unshallow
1616
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
@@ -21,10 +21,13 @@ jobs:
2121
- name: Install dependencies
2222
run: |
2323
python -m pip install --upgrade pip
24-
pip install --upgrade tox-gh-actions
25-
- name: Publish with tox and twine
24+
pip install --upgrade hatch
25+
- name: Build with hatch
26+
run: |
27+
hatch build
28+
- name: Publish with hatch
2629
env:
27-
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
28-
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
30+
HATCH_INDEX_USER: ${{secrets.HATCH_INDEX_USER}}
31+
HATCH_INDEX_AUTH: ${{secrets.HATCH_INDEX_AUTH}}
2932
run: |
30-
tox -e publish
33+
hatch publish

.github/workflows/run-python-tests.yaml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,23 @@ jobs:
2424
- name: Install dependencies
2525
run: |
2626
python -m pip install --upgrade pip
27-
pip install --upgrade tox-gh-actions
28-
- name: Test with tox/pytest
27+
pip install --upgrade hatch
28+
- name: Test with hatch/pytest
2929
run: |
30-
tox
30+
hatch run test:test
31+
- name: Check styling
32+
if: always()
33+
run: |
34+
hatch run lint:style
3135
- name: Publish Unit Test Results
3236
uses: EnricoMi/publish-unit-test-result-action@v2
3337
if: always()
3438
with:
3539
github_token: ${{ secrets.GITHUB_TOKEN }}
36-
junit_files: .tox/*.xml
37-
- name: Upload Coverage Results
38-
uses: codecov/codecov-action@v3
39-
if: success()
40+
junit_files: test-results.xml
41+
- name: Publish in Coveralls
42+
uses: coverallsapp/github-action@v2
43+
with:
44+
github-token: ${{ secrets.GITHUB_TOKEN }}
45+
flag-name: tests
46+
format: lcov

0 commit comments

Comments
 (0)