-
Notifications
You must be signed in to change notification settings - Fork 77
57 lines (48 loc) · 1.66 KB
/
dependencies.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Check deps
on:
pull_request:
paths:
- setup.py
- requirements.txt
- dev-requirements.txt
- docs/requirements.txt
- .github/workflows/dependencies.yml
env:
DEBIAN_FRONTEND: noninteractive
jobs:
quality:
name: Checking dependency graph
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ['ubuntu-latest']
python-version: ['3.8']
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: ./.github/actions/python-cache-requirements
with:
requirements: dev-requirements.txt
- name: Install dependencies
run: |
pip3 install -U "pip<24.3" # prevent relative bug path with pip 24.3 and pip-tools
pip3 install -c dev-requirements.txt pip-tools
- name: Check dependency graph
run: |
pip-compile -q --strip-extras
pip-compile -q --strip-extras dev-requirements.in
pip-compile -q --strip-extras docs/requirements.in
- name: Verify dependency graph is ok
uses: tj-actions/verify-changed-files@v20
id: verify-changed-files
with:
files: |
requirements.txt
dev-requirements.txt
docs/requirements.txt
- name: Validating graph
if: steps.verify-changed-files.outputs.files_changed == 'true'
run: |
echo "Dependency file(s) changed: ${{ steps.verify-changed-files.outputs.changed_files }}"
git diff
core.setFailed('Please add your new dependencies in setup.py and/or dev-requirements.in then run pip-compile to add them in requirements. (see docs/contribute/development)')