Skip to content

Commit

Permalink
Add GH job to check if lockfiles are outdated
Browse files Browse the repository at this point in the history
  • Loading branch information
thomass-dev committed Jan 31, 2025
1 parent 7feafe0 commit fa59a38
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,27 @@ jobs:
working-directory: skore/
run: pre-commit run --all-files ruff

backend-lockfiles:
runs-on: "ubuntu-latest"
if: ${{ github.event_name == 'pull_request' }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 2

- name: Check lockfiles are not obsolete
run: |
changes=$(git diff --name-only HEAD^1 HEAD)
if
(echo "${changes}" | grep -qE 'skore/(test-)?requirements.in') &&
(echo "${changes}" | (! grep -qE "skore/ci/requirements/.*/test-requirements.txt"))
then
echo '::error title=backend-lockfiles:: Lockfiles obsolete, please execute `$ cd skore/ci; bash pip-compile.sh`'
exit 1
fi
backend-test:
strategy:
fail-fast: false
Expand Down

0 comments on commit fa59a38

Please sign in to comment.