Skip to content

Commit 28f6295

Browse files
committed
builds
1 parent 1a86cff commit 28f6295

File tree

1 file changed

+27
-14
lines changed

1 file changed

+27
-14
lines changed

.github/workflows/ci-monorepo.yml

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,33 @@ jobs:
2929
steps:
3030
- uses: actions/checkout@v4
3131

32+
- name: Debug package info
33+
run: |
34+
echo "Package input: ${{ inputs.package }}"
35+
echo "Package dir from env: ${{ env.PACKAGE_DIR }}"
36+
echo "Package dir computed: libs/${{ inputs.package }}"
37+
echo "Current directory: $(pwd)"
38+
echo "Directory contents:"
39+
ls -la
40+
echo "Libs directory:"
41+
ls -la libs/
42+
echo "Package directory:"
43+
ls -la libs/${{ inputs.package }}/ || echo "Directory not found"
44+
3245
- name: Set up Python 3.12
3346
uses: actions/setup-python@v5
3447
with:
3548
python-version: '3.12'
3649

3750
- name: Install dependencies
51+
working-directory: libs/${{ inputs.package }}
3852
run: |
3953
python -m pip install --upgrade pip
40-
cd ${{ env.PACKAGE_DIR }}
4154
pip install -e ".[dev]"
4255
4356
- name: Run linting checks
57+
working-directory: libs/${{ inputs.package }}
4458
run: |
45-
cd ${{ env.PACKAGE_DIR }}
4659
echo "=== Running ruff ==="
4760
ruff check src/ tests/
4861
echo "=== Running black ==="
@@ -71,8 +84,8 @@ jobs:
7184
pip install bandit[toml] safety pip-audit
7285
7386
- name: Run Bandit security scan
87+
working-directory: libs/${{ inputs.package }}
7488
run: |
75-
cd ${{ env.PACKAGE_DIR }}
7689
echo "=== Running Bandit security scan ==="
7790
# Run bandit with config file and capture exit code
7891
bandit -c ../../.bandit -r src/ -f json -o bandit-report.json || BANDIT_EXIT=$?
@@ -95,7 +108,7 @@ jobs:
95108
96109
- name: Check dependencies with Safety
97110
run: |
98-
cd ${{ env.PACKAGE_DIR }}
111+
cd libs/${{ inputs.package }}
99112
echo "=== Checking dependencies with Safety ==="
100113
pip install -e ".[dev,test]"
101114
# Using the new 'scan' command as 'check' is deprecated
@@ -108,7 +121,7 @@ jobs:
108121
109122
- name: Run pip-audit
110123
run: |
111-
cd ${{ env.PACKAGE_DIR }}
124+
cd libs/${{ inputs.package }}
112125
echo "=== Running pip-audit ==="
113126
# Skip the local package as it's not on PyPI yet
114127
pip-audit --skip-editable
@@ -135,14 +148,14 @@ jobs:
135148
python-version: '3.12'
136149

137150
- name: Install dependencies
151+
working-directory: libs/${{ inputs.package }}
138152
run: |
139153
python -m pip install --upgrade pip
140-
cd ${{ env.PACKAGE_DIR }}
141154
pip install -e ".[test]"
142155
143156
- name: Run unit tests with coverage
144157
run: |
145-
cd ${{ env.PACKAGE_DIR }}
158+
cd libs/${{ inputs.package }}
146159
pytest tests/unit/ -v --cov=${{ inputs.package == 'async-cassandra' && 'async_cassandra' || 'async_cassandra_bulk' }} --cov-report=html --cov-report=xml || echo "No unit tests found (expected for new packages)"
147160
148161
build:
@@ -165,21 +178,21 @@ jobs:
165178
166179
- name: Build package
167180
run: |
168-
cd ${{ env.PACKAGE_DIR }}
181+
cd libs/${{ inputs.package }}
169182
echo "=== Building package ==="
170183
python -m build
171184
echo "=== Package contents ==="
172185
ls -la dist/
173186
174187
- name: Check package with twine
175188
run: |
176-
cd ${{ env.PACKAGE_DIR }}
189+
cd libs/${{ inputs.package }}
177190
echo "=== Checking package metadata ==="
178191
twine check dist/*
179192
180193
- name: Display package info
181194
run: |
182-
cd ${{ env.PACKAGE_DIR }}
195+
cd libs/${{ inputs.package }}
183196
echo "=== Wheel contents ==="
184197
python -m zipfile -l dist/*.whl | head -20
185198
echo "=== Package metadata ==="
@@ -240,9 +253,9 @@ jobs:
240253
python-version: '3.12'
241254

242255
- name: Install dependencies
256+
working-directory: libs/${{ inputs.package }}
243257
run: |
244258
python -m pip install --upgrade pip
245-
cd ${{ env.PACKAGE_DIR }}
246259
pip install -e ".[test,dev]"
247260
248261
- name: Verify Cassandra is ready
@@ -258,7 +271,7 @@ jobs:
258271
CASSANDRA_HOST: localhost
259272
CASSANDRA_PORT: 9042
260273
run: |
261-
cd ${{ env.PACKAGE_DIR }}
274+
cd libs/${{ inputs.package }}
262275
echo "=== Running ${{ matrix.test-suite.name }} ==="
263276
${{ matrix.test-suite.command }}
264277
@@ -304,9 +317,9 @@ jobs:
304317
python-version: '3.12'
305318

306319
- name: Install dependencies
320+
working-directory: libs/${{ inputs.package }}
307321
run: |
308322
python -m pip install --upgrade pip
309-
cd ${{ env.PACKAGE_DIR }}
310323
pip install -e ".[test,dev]"
311324
312325
- name: Verify Cassandra is ready
@@ -322,7 +335,7 @@ jobs:
322335
CASSANDRA_HOST: localhost
323336
CASSANDRA_PORT: 9042
324337
run: |
325-
cd ${{ env.PACKAGE_DIR }}
338+
cd libs/${{ inputs.package }}
326339
echo "=== Running ${{ matrix.test-suite.name }} ==="
327340
${{ matrix.test-suite.command }}
328341

0 commit comments

Comments
 (0)