chore: bump simunet version to 0.3.13 #18
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| branches: [master, main] | |
| paths: | |
| - 'bases/**' | |
| - 'components/**' | |
| - 'projects/**' | |
| - 'pyproject.toml' | |
| - 'poetry.lock' | |
| - 'tests/**' | |
| push: | |
| branches: [master, main] | |
| paths: | |
| - 'bases/**' | |
| - 'components/**' | |
| - 'projects/**' | |
| - 'pyproject.toml' | |
| - 'poetry.lock' | |
| - 'tests/**' | |
| jobs: | |
| test: | |
| name: Lint and Test | |
| runs-on: ubuntu-latest | |
| container: | |
| image: ghcr.io/opensecflow/netdriver/python-poetry | |
| permissions: | |
| contents: read | |
| packages: read | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Verify Poetry installation | |
| run: | | |
| poetry --version | |
| poetry self show plugins | |
| - name: Install dependencies | |
| run: poetry install --no-interaction | |
| - name: Run pylint | |
| run: | | |
| echo "Running pylint checks..." | |
| poetry run pylint bases/ components/ --exit-zero --output-format=colorized || true | |
| continue-on-error: true | |
| - name: Run unit test | |
| run: | | |
| echo "Running unit pytest..." | |
| poetry run pytest -v --tb=short -m unit | |
| - name: Run integration test | |
| run: | | |
| echo "Running integration pytest..." | |
| poetry run pytest -v --tb=short --mock-dev -m integration | |
| - name: Generate test summary | |
| if: always() | |
| run: | | |
| echo "## Test Results" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| if [ $? -eq 0 ]; then | |
| echo "✅ All tests passed" >> $GITHUB_STEP_SUMMARY | |
| else | |
| echo "❌ Some tests failed" >> $GITHUB_STEP_SUMMARY | |
| fi | |
| build: | |
| name: Build packages | |
| needs: test | |
| runs-on: ubuntu-latest | |
| container: | |
| image: ghcr.io/opensecflow/netdriver/python-poetry | |
| permissions: | |
| contents: read | |
| packages: read | |
| strategy: | |
| matrix: | |
| project: ['agent', 'simunet'] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Verify Poetry installation | |
| run: | | |
| poetry --version | |
| poetry self show plugins | |
| - name: Install dependencies | |
| run: poetry install --no-interaction | |
| - name: Build ${{ matrix.project }} | |
| run: | | |
| echo "Building netdriver-${{ matrix.project }}..." | |
| poetry build-project -C projects/${{ matrix.project }} --format wheel | |
| - name: Check package metadata | |
| run: | | |
| pip install twine | |
| twine check projects/${{ matrix.project }}/dist/*.whl | |
| - name: Verify package contents | |
| run: | | |
| python -m zipfile -l projects/${{ matrix.project }}/dist/*.whl | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: netdriver-${{ matrix.project }} | |
| path: projects/${{ matrix.project }}/dist/*.whl | |
| retention-days: 7 | |
| verify: | |
| name: Verify builds | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| - name: List artifacts | |
| run: | | |
| echo "Built packages:" | |
| find . -name "*.whl" -type f -exec ls -lh {} \; | |
| - name: Build summary | |
| run: | | |
| echo "## Build Summary" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "| Package | Size | Status |" >> $GITHUB_STEP_SUMMARY | |
| echo "|---------|------|--------|" >> $GITHUB_STEP_SUMMARY | |
| for whl in $(find . -name "*.whl" -type f); do | |
| name=$(basename "$whl") | |
| size=$(du -h "$whl" | cut -f1) | |
| echo "| $name | $size | ✓ |" >> $GITHUB_STEP_SUMMARY | |
| done |