Skip to content

Commit

Permalink
gha - don't stop if Pipefile.lock is modified, but add a warning abou…
Browse files Browse the repository at this point in the history
…t it

This is because it should not break the tests suite, but still is something to deal with
  • Loading branch information
cderv committed Oct 31, 2024
1 parent aa98c3d commit a34e9d0
Showing 1 changed file with 22 additions and 4 deletions.
26 changes: 22 additions & 4 deletions .github/workflows/actions/quarto-dev/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,28 @@ runs:
echo "Unexpected package/dist/share path detected: $(quarto --paths)"
Exit 1
}
If ( "$(git status --porcelain)" -ne "" ) {
echo "Uncommitted changes detected:"
git status --porcelain
Exit 1
# check if configure is modifying some files as it should not
$modifiedFiles = git diff --name-only
If ($modifiedFiles -ne "") {
# Convert the list to an array
$modifiedFilesArray = $modifiedFiles -split "`n" | ForEach-Object { $_.Trim() }
If ($modifiedFilesArray -contains "tests/Pipfile.lock") {
Write-Output "::warning::test/Pipfile.lock has been modified."
$modifiedFilesArray = $modifiedFilesArray | Where-Object { $_ -notmatch "Pipfile.lock" }
}
# Count the number of modified files
$modifiedFilesCount = $modifiedFilesArray.Count
If ($modifiedFilesCount -ge 1) {
Write-Output "::error::Uncommitted changes detected."
foreach ($file in $modifiedFilesArray) {
Write-Output $file
}
Exit 1
}
}
- name: Quarto Check
Expand Down

0 comments on commit a34e9d0

Please sign in to comment.