Skip to content

Commit 4471e92

Browse files
committed
Update workflows and checks
1 parent b7c08a2 commit 4471e92

3 files changed

Lines changed: 9 additions & 5 deletions

File tree

‎.github/workflows/package_checks.yml‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ on:
1010
schedule:
1111
- cron: "10 5 * * 1"
1212

13+
env:
14+
PACKAGE_DIR: requirements_management
15+
1316
jobs:
1417
package_checks:
1518
runs-on: ubuntu-latest
@@ -32,9 +35,8 @@ jobs:
3235
3336
- name: Install Sysand dependencies
3437
run: |
35-
cd requirements_management
38+
cd ${PACKAGE_DIR}
3639
sysand sync
37-
cd ..
3840
3941
- name: Check packages with pytest
4042
run: pytest package_checks --durations=0
@@ -43,5 +45,5 @@ jobs:
4345

4446
- name: Build kpars
4547
run: |
46-
cd requirements_management
48+
cd ${PACKAGE_DIR}
4749
sysand build --update-meta

‎.github/workflows/release.yml‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ on:
1515

1616
env:
1717
SYSAND_INDEX_URL: https://sysand.com
18+
PACKAGE_DIR: requirements_management
1819

1920
jobs:
2021
test:
@@ -30,6 +31,7 @@ jobs:
3031
3132
- name: Check version in git tag matches the project's declared version
3233
run: |
34+
cd ${PACKAGE_DIR}
3335
PROJECT_VERSION="$(sysand info version)"
3436
TAG_VERSION="${GITHUB_REF_NAME#v}"
3537
if [ "$PROJECT_VERSION" != "$TAG_VERSION" ]; then
@@ -71,6 +73,6 @@ jobs:
7173
7274
- name: Build and publish the project to the index
7375
run: |
74-
cd requirements_management
76+
cd ${PACKAGE_DIR}
7577
sysand build --update-meta
7678
sysand publish --index "${SYSAND_INDEX_URL}"

‎package_checks/package_checks.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ def _get_package_dependencies(package: str, existing_paths: list):
121121
package_dependencies = []
122122
package_path = PACKAGES_PATH / package
123123

124-
for dependency_file in package_path.glob('.sysand/lib/*/*.sysml'):
124+
for dependency_file in package_path.glob('.sysand/lib/**/*.sysml'):
125125
if dependency_file.name not in existing_filenames:
126126
package_dependencies.append(dependency_file)
127127
existing_filenames.add(dependency_file.name)

0 commit comments

Comments
 (0)