4
4
pull_request :
5
5
paths :
6
6
- " integrations/**/pyproject.toml"
7
+ - " .github/workflows/CI_license_compliance.yml"
7
8
# Since we test PRs, there is no need to run the workflow at each
8
9
# merge on `main`. Let's use a cron job instead.
9
10
schedule :
12
13
env :
13
14
CORE_DATADOG_API_KEY : ${{ secrets.CORE_DATADOG_API_KEY }}
14
15
PYTHON_VERSION : " 3.10"
15
- EXCLUDE_PACKAGES : " (?i)^(deepeval|cohere| fastembed|ragas|tqdm|psycopg|typing_extensions).*"
16
+ EXCLUDE_PACKAGES : " (?i)^(deepeval|fastembed|ollama |ragas|tqdm|psycopg|typing_extensions).*"
16
17
17
18
# Exclusions must be explicitly motivated
18
19
#
19
20
# - deepeval is Apache 2.0 but the license is not available on PyPI
20
- # - cohere is MIT but the license is not available on PyPI
21
21
# - fastembed is Apache 2.0 but the license on PyPI is unclear ("Other/Proprietary License (Apache License)")
22
+ # - ollama is MIT but the license is not available on PyPI
22
23
# - ragas is Apache 2.0 but the license is not available on PyPI
23
24
# - typing_extensions>=4.13.0 has a Python Software Foundation License 2.0 but pip-license-checker does not recognize it
24
25
# (https://github.com/pilosus/pip-license-checker/issues/143)
@@ -41,25 +42,28 @@ jobs:
41
42
with :
42
43
python-version : " ${{ env.PYTHON_VERSION }}"
43
44
44
- - name : Get changed pyproject files (for pull requests only)
45
- if : ${{ github.event_name == 'pull_request' }}
45
+ - name : Get changed files (for pull requests only)
46
+ if : ${{ github.event_name == 'pull_request'}}
46
47
id : changed-files
47
48
uses : tj-actions/changed-files@v46
48
49
with :
49
- files : |
50
- integrations/**/pyproject.toml
50
+ files_yaml : |
51
+ pyproject:
52
+ - integrations/**/pyproject.toml
53
+ workflow:
54
+ - .github/workflows/CI_license_compliance.yml
51
55
52
56
- name : Get direct dependencies from pyproject.toml files
53
57
run : |
54
58
pip install toml
55
59
56
60
# Determine the list of pyproject.toml files to process
57
- if [ "${{ github.event_name }}" = "schedule" ]; then
58
- echo "Scheduled run: processing all pyproject.toml files..."
61
+ if [ "${{ github.event_name }}" = "schedule" ] || [ "${{ steps.changed-files.outputs.workflow_any_changed }}" = "true" ] ; then
62
+ echo "Scheduled run or workflow changed : processing all pyproject.toml files..."
59
63
FILES=$(find integrations -type f -name 'pyproject.toml')
60
64
else
61
- echo "Pull request: processing changed pyproject.toml files..."
62
- FILES="${{ steps.changed-files.outputs.all_changed_files }}"
65
+ echo "Pull request with pyproject changes : processing changed pyproject.toml files..."
66
+ FILES="${{ steps.changed-files.outputs.pyproject_all_changed_files }}"
63
67
fi
64
68
65
69
for file in $FILES; do
0 commit comments