@@ -37,14 +37,15 @@ jobs:
3737 - name : Check out repository
3838 uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
3939
40- - name : Set up Python
41- uses : actions /setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c
40+ - name : Install uv
41+ uses : astral-sh /setup-uv@5a7eac68fb9809dea845d802897dc5c723910fa3
4242 with :
43- check-latest : true
4443 python-version : ' 3.14'
44+ version : ' 0.9.9'
4545
4646 - name : Run pre-commit
47- uses : pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd
47+ run : |
48+ uv tool run pre-commit run --all-files
4849
4950 code-ql :
5051 name : CodeQL
@@ -88,22 +89,34 @@ jobs:
8889 - name : Check out repository
8990 uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
9091
91- - name : Set up Python ${{ matrix.python-version }}
92- uses : actions /setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c
92+ - name : Install uv
93+ uses : astral-sh /setup-uv@5a7eac68fb9809dea845d802897dc5c723910fa3
9394 with :
94- allow-prereleases : true
95- cache : pip
96- cache-dependency-path : |
97- requirements/runtime.txt
98- requirements/tests.txt
99- check-latest : true
95+ activate-environment : true
96+ # setup-uv doesn't use latest Python 3.9 on macos
97+ # https://github.com/astral-sh/setup-uv/issues/212
10098 python-version : ${{ matrix.python-version }}
99+ version : ' 0.9.9'
100+
101+ # - name: Set up Python ${{ matrix.python-version }}
102+ # uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
103+ # with:
104+ # allow-prereleases: true
105+ # cache: pip
106+ # cache-dependency-path: |
107+ # requirements/runtime.txt
108+ # requirements/tests.txt
109+ # check-latest: true
110+ # python-version: ${{ matrix.python-version }}
101111
102- - name : Install dependencies
112+ - name : Set up Python ${{ matrix.python-version }}
103113 run : |
104- python -m pip install --upgrade pip
105- python -m pip install --requirement requirements/tests.txt
106- python -m pip install .
114+ uv python install --managed-python
115+
116+ - name : Install project
117+ run : |
118+ uv sync --locked --no-default-groups --group tests
119+ uv pip install .
107120
108121 - name : Run tests
109122 run : |
@@ -122,20 +135,27 @@ jobs:
122135 - name : Check out repository
123136 uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
124137
125- - name : Set up Python
126- uses : actions /setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c
138+ - name : Install uv
139+ uses : astral-sh /setup-uv@5a7eac68fb9809dea845d802897dc5c723910fa3
127140 with :
128- cache : pip
129- cache-dependency-path : |
130- requirements/build.txt
131- check-latest : true
141+ activate-environment : true
132142 python-version : ' 3.14'
133-
134- - name : Install dependencies
135- run : |
136- python -m pip install --upgrade pip
137- python -m pip install -r requirements/build.txt
138- python -m pip install .
143+ version : ' 0.9.9'
144+
145+ # - name: Set up Python
146+ # uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
147+ # with:
148+ # cache: pip
149+ # cache-dependency-path: |
150+ # requirements/build.txt
151+ # check-latest: true
152+ # python-version: '3.14'
153+
154+ # - name: Install dependencies
155+ # run: |
156+ # python -m pip install --upgrade pip
157+ # python -m pip install -r requirements/build.txt
158+ # python -m pip install .
139159
140160 - name : Build distribution
141161 run : |
@@ -152,12 +172,12 @@ jobs:
152172 run : echo "VERSION=$(echo ${{ github.ref_name }} | sed 's/^v//')" >> $GITHUB_ENV
153173
154174 - name : Generate SBOM
155- if : startsWith(github.event.ref, 'refs/tags/v')
175+ # if: startsWith(github.event.ref, 'refs/tags/v')
156176 run : |
157177 make sbom > holidays-${{ env.VERSION }}-sbom.json
158178
159179 - name : Upload SBOM
160- if : startsWith(github.event.ref, 'refs/tags/v')
180+ # if: startsWith(github.event.ref, 'refs/tags/v')
161181 uses : actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
162182 with :
163183 name : sbom
@@ -212,17 +232,23 @@ jobs:
212232 - name : Check out repository
213233 uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
214234
215- - name : Set Up Python
216- uses : actions /setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c
235+ - name : Install uv
236+ uses : astral-sh /setup-uv@5a7eac68fb9809dea845d802897dc5c723910fa3
217237 with :
218- cache : pip
219- cache-dependency-path : requirements/docs.txt
238+ activate-environment : true
220239 python-version : ' 3.14'
240+ version : ' 0.9.9'
241+
242+ # - name: Set Up Python
243+ # uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
244+ # with:
245+ # cache: pip
246+ # cache-dependency-path: requirements/docs.txt
247+ # python-version: '3.13'
221248
222- - name : Install dependencies
249+ - name : Install project
223250 run : |
224- python -m pip install --requirement requirements/docs.txt
225- python -m pip install .
251+ uv sync --locked --no-default-groups --group docs
226252
227253 - name : Build docs
228254 run : |
0 commit comments