@@ -9,6 +9,7 @@ permissions: {}
99env :
1010 PYTHONUNBUFFERED : 1
1111 FORCE_COLOR : 1
12+ UV_FROZEN : true # do not update the lockfile during `uv sync` and `uv run` commands
1213
1314jobs :
1415 test :
@@ -18,23 +19,26 @@ jobs:
1819 matrix :
1920 python-version : ['3.10', '3.12', '3.13']
2021 steps :
22+ - name : Set up just
23+ uses : extractions/setup-just@v2
2124 - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
22- - name : Set up Python ${{ matrix.python-version }}
23- uses : actions /setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
25+ - name : Set up uv
26+ uses : astral-sh /setup-uv@4db96194c378173c656ce18a155ffc14a9fc4355 # v5.2.2
2427 with :
2528 python-version : ${{ matrix.python-version }}
26- cache : pip
27- - name : Install pre-requisites (e.g. hatch)
28- run : python -m pip install --require-hashes --requirement=requirements/ci
29+ enable-cache : true
30+ prune-cache : false
31+ - name : Install project, including dev dependencies
32+ run : just sync
2933 - name : Run test suite
30- run : hatch run cov
34+ run : just cov
3135 env :
3236 TERM : dumb # keep rich from printing escape sequences, which made testing CLI outputs messy
3337 - name : Generate coverage report
3438 run : |
3539 export TOTAL_COV=$(hatch run cov-total)
3640 echo "TOTAL_COV=$TOTAL_COV" >> $GITHUB_ENV
37- hatch run cov-report-markdown
41+ just cov-report-markdown
3842 echo "### Total coverage: ${TOTAL_COV}%" >> $GITHUB_STEP_SUMMARY
3943 cat coverage.md >> $GITHUB_STEP_SUMMARY
4044 if : matrix.python-version == '3.13'
@@ -66,31 +70,32 @@ jobs:
6670 matrix :
6771 os : [ubuntu-latest, windows-latest, macos-latest]
6872 steps :
73+ - name : Set up just
74+ uses : extractions/setup-just@v2
6975 - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
70- - uses : actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
76+ - name : Set up uv
77+ uses : astral-sh/setup-uv@4db96194c378173c656ce18a155ffc14a9fc4355 # v5.2.2
7178 with :
7279 python-version : ' 3.13'
73- cache : pip
74- - run : python -Im pip install --editable .[dev]
80+ enable-cache : true
81+ prune-cache : false
82+ - run : just sync
7583 - run : python -Ic 'import re3data; print(re3data.__version__)'
7684 - run : re3data --version
77- - name : Set up pipdeptree
78- if : matrix.os == 'ubuntu-latest'
79- run : python -m pip install --require-hashes --requirement=requirements/ci
8085 - name : Write info to step summary
8186 if : matrix.os == 'ubuntu-latest'
8287 run : |
8388 {
8489 echo -e "### ✓ All dependencies installed successfully\n\n"
8590 echo '<details><summary>Installed Python packages (dependency tree)</summary>'
8691 echo -e "\n\`\`\`console"
87- echo "$ uv pip tree --package=python-re3data "
88- uv pip tree --package=python-re3data
92+ echo "$ uv tree --no-group={dev,test} "
93+ uv tree --no-group={dev,test}
8994 echo -e "\`\`\`\n</details>"
9095 echo '<details><summary>Outdated Python packages</summary>'
9196 echo -e "\n\`\`\`console"
92- echo "$ python -m pip list --outdated"
93- python -m pip list --outdated
97+ echo "$ uv pip list --outdated"
98+ uv pip list --outdated
9499 echo -e "\`\`\`\n</details>"
95100 } >> $GITHUB_STEP_SUMMARY
96101
@@ -107,11 +112,14 @@ jobs:
107112 env :
108113 NO_COLOR : 1
109114 steps :
115+ - name : Set up just
116+ uses : extractions/setup-just@v2
110117 - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
111- - uses : astral-sh/setup-uv@4db96194c378173c656ce18a155ffc14a9fc4355 # v5.2.2
118+ - name : Set up uv
119+ uses : astral-sh/setup-uv@4db96194c378173c656ce18a155ffc14a9fc4355 # v5.2.2
112120 - name : Get package version
113121 id : package-version
114- run : echo "version=$(uvx hatch version)" >> $GITHUB_OUTPUT
122+ run : echo "version=$(just project- version)" >> $GITHUB_OUTPUT
115123 - uses : docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # v3.8.0
116124 - name : Build and push
117125 uses : docker/build-push-action@ca877d9245402d1537745e0e356eab47c3520991 # v6.13.0
0 commit comments