Skip to content

Commit

Permalink
Add compiled requirements check to GHA
Browse files Browse the repository at this point in the history
  • Loading branch information
neob91-close committed Dec 10, 2024
1 parent 3b9717d commit bed4a91
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/build-and-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,34 @@ jobs:
- name: Run flake8
run: flake8

check-compiled-requirements:
runs-on: arc-amd64-runners
if: ${{ !contains(github.event.head_commit.message, '#notests') }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
- uses: actions/setup-python@v5
with:
python-version: '3.12.3'

- name: Prepare environment
run: |
pip install --no-deps -r requirements/requirements-pip.txt
pip install $(grep -rwoh requirements -e 'pip-tools==.*[^\]' | head -n 1)
- name: Compile Requirements Files
run: |
./scripts/pip-compile-all.sh
- name: Check If Output Matches Committed
run: |
DIFF="$(git diff)"
if [ "$DIFF" ]; then
echo "Compiled requirements differ from committed requirements!"
echo "$DIFF"
exit 1
fi
build:
runs-on: ${{ matrix.runs-on }}
Expand Down

0 comments on commit bed4a91

Please sign in to comment.