|
6 | 6 | - main |
7 | 7 |
|
8 | 8 | jobs: |
9 | | - validate-version: |
10 | | - name: Validate version updates |
| 9 | + validate-uipath-llm-client: |
| 10 | + name: uipath-llm-client |
11 | 11 | runs-on: ubuntu-latest |
12 | 12 | steps: |
13 | 13 | - uses: actions/checkout@v6 |
14 | 14 | with: |
15 | 15 | fetch-depth: 0 |
16 | 16 |
|
17 | 17 | - name: Get changed files |
18 | | - id: changes |
19 | 18 | run: | |
20 | 19 | git diff origin/main...HEAD --name-only > changes.txt |
21 | 20 | echo "Changed files:" |
22 | 21 | cat changes.txt |
23 | 22 |
|
24 | | - - name: Validate version updates for changed packages |
| 23 | + - name: Validate version update |
25 | 24 | run: | |
26 | | - VALIDATION_FAILED=0 |
27 | | -
|
28 | | - # Core package: src/uipath_llm_client/ -> src/uipath_llm_client/__version__.py |
29 | 25 | core_changes=$(grep -E '^src/uipath_llm_client/' changes.txt | grep -v '__version__.py' || true) |
30 | 26 | core_version=$(grep -E '^src/uipath_llm_client/__version__.py' changes.txt || true) |
31 | 27 | if [ -n "$core_changes" ] && [ -z "$core_version" ]; then |
32 | | - echo "::error::Core package (src/uipath_llm_client/) changes detected but no version update in src/uipath_llm_client/__version__.py" |
33 | | - VALIDATION_FAILED=1 |
34 | | - fi |
35 | | -
|
36 | | - # Langchain package: packages/uipath_langchain_client/ -> packages/uipath_langchain_client/src/uipath_langchain_client/__version__.py |
37 | | - langchain_changes=$(grep -E '^packages/uipath_langchain_client/' changes.txt | grep -v '__version__.py' || true) |
38 | | - langchain_version=$(grep -E '^packages/uipath_langchain_client/src/uipath_langchain_client/__version__.py' changes.txt || true) |
39 | | - if [ -n "$langchain_changes" ] && [ -z "$langchain_version" ]; then |
40 | | - echo "::error::Langchain package (packages/uipath_langchain_client/) changes detected but no version update in packages/uipath_langchain_client/src/uipath_langchain_client/__version__.py" |
41 | | - VALIDATION_FAILED=1 |
42 | | - fi |
43 | | -
|
44 | | - # LlamaIndex package: packages/uipath_llamaindex_client/ -> packages/uipath_llamaindex_client/src/uipath_llamaindex_client/__version__.py |
45 | | - llamaindex_changes=$(grep -E '^packages/uipath_llamaindex_client/' changes.txt | grep -v '__version__.py' || true) |
46 | | - llamaindex_version=$(grep -E '^packages/uipath_llamaindex_client/src/uipath_llamaindex_client/__version__.py' changes.txt || true) |
47 | | - if [ -n "$llamaindex_changes" ] && [ -z "$llamaindex_version" ]; then |
48 | | - echo "::error::LlamaIndex package (packages/uipath_llamaindex_client/) changes detected but no version update in packages/uipath_llamaindex_client/src/uipath_llamaindex_client/__version__.py" |
49 | | - VALIDATION_FAILED=1 |
50 | | - fi |
51 | | -
|
52 | | - if [ $VALIDATION_FAILED -eq 1 ]; then |
| 28 | + echo "::error::uipath-llm-client: package changes detected but no version update in src/uipath_llm_client/__version__.py" |
53 | 29 | exit 1 |
54 | 30 | fi |
55 | | - echo "✓ All package versions are consistent with changes." |
| 31 | + echo "✓ Version is consistent with changes." |
56 | 32 |
|
57 | | - - name: Validate changelog updates for version changes |
| 33 | + - name: Validate changelog update |
58 | 34 | run: | |
59 | | - VALIDATION_FAILED=0 |
60 | | -
|
61 | | - # Core package: src/uipath_llm_client/__version__.py -> CHANGELOG.md (root) |
62 | 35 | core_version=$(grep -E '^src/uipath_llm_client/__version__.py' changes.txt || true) |
63 | 36 | core_changelog=$(grep -E '^CHANGELOG.md' changes.txt || true) |
64 | 37 | if [ -n "$core_version" ] && [ -z "$core_changelog" ]; then |
65 | | - echo "::error::Core package version changed but no changelog update in CHANGELOG.md" |
66 | | - VALIDATION_FAILED=1 |
| 38 | + echo "::error::uipath-llm-client: version changed but no changelog update in CHANGELOG.md" |
| 39 | + exit 1 |
67 | 40 | fi |
| 41 | + echo "✓ Changelog is consistent with version changes." |
68 | 42 |
|
69 | | - # Langchain package: packages/uipath_langchain_client/src/uipath_langchain_client/__version__.py -> packages/uipath_langchain_client/CHANGELOG.md |
70 | | - langchain_version=$(grep -E '^packages/uipath_langchain_client/src/uipath_langchain_client/__version__.py' changes.txt || true) |
71 | | - langchain_changelog=$(grep -E '^packages/uipath_langchain_client/CHANGELOG.md' changes.txt || true) |
72 | | - if [ -n "$langchain_version" ] && [ -z "$langchain_changelog" ]; then |
73 | | - echo "::error::Langchain package version changed but no changelog update in packages/uipath_langchain_client/CHANGELOG.md" |
74 | | - VALIDATION_FAILED=1 |
75 | | - fi |
| 43 | + validate-uipath-langchain-client: |
| 44 | + name: uipath-langchain-client |
| 45 | + runs-on: ubuntu-latest |
| 46 | + steps: |
| 47 | + - uses: actions/checkout@v6 |
| 48 | + with: |
| 49 | + fetch-depth: 0 |
| 50 | + |
| 51 | + - name: Get changed files |
| 52 | + run: | |
| 53 | + git diff origin/main...HEAD --name-only > changes.txt |
| 54 | + echo "Changed files:" |
| 55 | + cat changes.txt |
76 | 56 |
|
77 | | - # LlamaIndex package: packages/uipath_llamaindex_client/src/uipath_llamaindex_client/__version__.py -> packages/uipath_llamaindex_client/CHANGELOG.md |
78 | | - llamaindex_version=$(grep -E '^packages/uipath_llamaindex_client/src/uipath_llamaindex_client/__version__.py' changes.txt || true) |
79 | | - llamaindex_changelog=$(grep -E '^packages/uipath_llamaindex_client/CHANGELOG.md' changes.txt || true) |
80 | | - if [ -n "$llamaindex_version" ] && [ -z "$llamaindex_changelog" ]; then |
81 | | - echo "::error::LlamaIndex package version changed but no changelog update in packages/uipath_llamaindex_client/CHANGELOG.md" |
82 | | - VALIDATION_FAILED=1 |
| 57 | + - name: Validate version update |
| 58 | + run: | |
| 59 | + langchain_changes=$(grep -E '^packages/uipath_langchain_client/' changes.txt | grep -v '__version__.py' || true) |
| 60 | + langchain_version=$(grep -E '^packages/uipath_langchain_client/src/uipath_langchain_client/__version__.py' changes.txt || true) |
| 61 | + if [ -n "$langchain_changes" ] && [ -z "$langchain_version" ]; then |
| 62 | + echo "::error::uipath-langchain-client: package changes detected but no version update in packages/uipath_langchain_client/src/uipath_langchain_client/__version__.py" |
| 63 | + exit 1 |
83 | 64 | fi |
| 65 | + echo "✓ Version is consistent with changes." |
84 | 66 |
|
85 | | - if [ $VALIDATION_FAILED -eq 1 ]; then |
| 67 | + - name: Validate changelog update |
| 68 | + run: | |
| 69 | + langchain_version=$(grep -E '^packages/uipath_langchain_client/src/uipath_langchain_client/__version__.py' changes.txt || true) |
| 70 | + langchain_changelog=$(grep -E '^packages/uipath_langchain_client/CHANGELOG.md' changes.txt || true) |
| 71 | + if [ -n "$langchain_version" ] && [ -z "$langchain_changelog" ]; then |
| 72 | + echo "::error::uipath-langchain-client: version changed but no changelog update in packages/uipath_langchain_client/CHANGELOG.md" |
86 | 73 | exit 1 |
87 | 74 | fi |
88 | | - echo "✓ All changelogs are consistent with version changes." |
| 75 | + echo "✓ Changelog is consistent with version changes." |
0 commit comments