Skip to content

Commit c855df8

Browse files
authored
chore: review license compliance workflow (#1843)
* chore: review license compliance workflow * refactor * deepeval
1 parent 8d8fcf9 commit c855df8

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

.github/workflows/CI_license_compliance.yml

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
pull_request:
55
paths:
66
- "integrations/**/pyproject.toml"
7+
- ".github/workflows/CI_license_compliance.yml"
78
# Since we test PRs, there is no need to run the workflow at each
89
# merge on `main`. Let's use a cron job instead.
910
schedule:
@@ -12,13 +13,13 @@ on:
1213
env:
1314
CORE_DATADOG_API_KEY: ${{ secrets.CORE_DATADOG_API_KEY }}
1415
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).*"
1617

1718
# Exclusions must be explicitly motivated
1819
#
1920
# - 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
2121
# - 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
2223
# - ragas is Apache 2.0 but the license is not available on PyPI
2324
# - typing_extensions>=4.13.0 has a Python Software Foundation License 2.0 but pip-license-checker does not recognize it
2425
# (https://github.com/pilosus/pip-license-checker/issues/143)
@@ -41,25 +42,28 @@ jobs:
4142
with:
4243
python-version: "${{ env.PYTHON_VERSION }}"
4344

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'}}
4647
id: changed-files
4748
uses: tj-actions/changed-files@v46
4849
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
5155
5256
- name: Get direct dependencies from pyproject.toml files
5357
run: |
5458
pip install toml
5559
5660
# 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..."
5963
FILES=$(find integrations -type f -name 'pyproject.toml')
6064
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 }}"
6367
fi
6468
6569
for file in $FILES; do

0 commit comments

Comments
 (0)