@@ -147,8 +147,7 @@ jobs:
147147 runs-on : ubuntu-latest
148148 steps :
149149 - uses : actions/checkout@v4
150-
151- - name : Create test project
150+ - name : Setup test project
152151 run : |
153152 mkdir -p test-project
154153 cat > test-project/pyproject.toml << EOF
@@ -161,23 +160,54 @@ jobs:
161160 "pytest>=7.4.0",
162161 ]
163162 EOF
164-
165- - name : Generate lock and requirements files
166- working-directory : test-project
163+ - name : Install uv
167164 run : |
168165 curl -LsSf https://astral.sh/uv/install.sh | sh
169166 echo "$HOME/.cargo/bin" >> $GITHUB_PATH
170- uv sync
171- uv pip compile pyproject.toml -o requirements.txt
172-
173- - name : Modify pyproject.toml to cause requirements failure
167+ - name : Generate requirements.txt
174168 working-directory : test-project
175169 run : |
176- sed -i 's/pytest>=7.4.0/pytest>=7.5.0/' pyproject.toml
177-
178- - name : Test requirements failure case
170+ uv sync
171+ uv pip compile pyproject.toml -o requirements.txt
172+ - name : Modify pyproject.toml
173+ run : sed -i 's/pytest>=7.4.0/pytest>=7.5.0/' test-project/pyproject.toml
174+ - name : Run action
179175 uses : ./
180- continue-on-error : true
181176 with :
182177 pyproject-path : test-project/pyproject.toml
183- requirements-path : test-project/requirements.txt
178+ requirements-path : test-project/requirements.txt
179+ requirements-command : uv pip compile pyproject.toml -o requirements.txt
180+
181+ test-uv-lock-failure :
182+ runs-on : ubuntu-latest
183+ steps :
184+ - uses : actions/checkout@v4
185+ - name : Setup test project
186+ run : |
187+ mkdir -p test-project
188+ cat > test-project/pyproject.toml << EOF
189+ [project]
190+ name = "test-project"
191+ version = "0.1.0"
192+ requires-python = ">=3.9"
193+ dependencies = [
194+ "requests>=2.31.0",
195+ "pytest>=7.4.0",
196+ ]
197+ EOF
198+ - name : Install uv
199+ run : |
200+ curl -LsSf https://astral.sh/uv/install.sh | sh
201+ echo "$HOME/.cargo/bin" >> $GITHUB_PATH
202+ - name : Generate uv.lock
203+ working-directory : test-project
204+ run : uv sync
205+ - name : Modify pyproject.toml
206+ run : sed -i 's/pytest>=7.4.0/pytest>=7.5.0/' test-project/pyproject.toml
207+ - name : Update uv.lock
208+ working-directory : test-project
209+ run : uv sync
210+ - name : Run action
211+ uses : ./
212+ with :
213+ pyproject-path : test-project/pyproject.toml
0 commit comments