Compare commits

...

3 Commits

Author SHA1 Message Date
6095d0d2ed ci: solidify promotion dependencies with explicit test list
Some checks failed
CI / Lint (ruff) (push) Successful in 11s
CI / SAST (bandit) (push) Successful in 12s
CI / Dependency audit (pip-audit) (push) Successful in 21s
CI / Test (Standard) (3.11) (push) Successful in 1m9s
CI / Test (Standard) (3.12) (push) Successful in 1m11s
CI / Test (Live) (3.11) (push) Successful in 54s
CI / Merge dev → testing (push) Has been cancelled
CI / Prepare Merge to Main (push) Has been cancelled
CI / Finalize Merge to Main (push) Has been cancelled
CI / Test (Fuzz) (3.11) (push) Has been cancelled
2026-04-12 04:24:29 -04:00
04685ba1c4 ci: reorder heavy tests (Live before Fuzz) 2026-04-12 04:22:33 -04:00
2ce3f7ee90 ci: delegate release tagging and versioning to release.yml 2026-04-12 04:21:28 -04:00
2 changed files with 51 additions and 39 deletions

View File

@@ -57,21 +57,6 @@ jobs:
- run: pip install -e .[dev] - run: pip install -e .[dev]
- run: pytest - run: pytest
test-fuzz:
name: Test (Fuzz)
runs-on: ubuntu-latest
needs: [test-standard]
strategy:
matrix:
python-version: ["3.11"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- run: pip install -e .[dev]
- run: pytest -m fuzz
test-live: test-live:
name: Test (Live) name: Test (Live)
runs-on: ubuntu-latest runs-on: ubuntu-latest
@@ -87,10 +72,25 @@ jobs:
- run: pip install -e .[dev] - run: pip install -e .[dev]
- run: pytest -m live - run: pytest -m live
test-fuzz:
name: Test (Fuzz)
runs-on: ubuntu-latest
needs: [test-live]
strategy:
matrix:
python-version: ["3.11"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- run: pip install -e .[dev]
- run: pytest -m fuzz
merge-to-testing: merge-to-testing:
name: Merge dev → testing name: Merge dev → testing
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: [test-standard, test-fuzz, test-live] needs: [test-standard, test-live, test-fuzz]
if: github.ref == 'refs/heads/dev' if: github.ref == 'refs/heads/dev'
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
@@ -111,7 +111,7 @@ jobs:
prepare-merge-to-main: prepare-merge-to-main:
name: Prepare Merge to Main name: Prepare Merge to Main
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: [test-standard, test-fuzz, test-live] needs: [test-standard, test-live, test-fuzz]
if: github.ref == 'refs/heads/testing' if: github.ref == 'refs/heads/testing'
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
@@ -133,7 +133,7 @@ jobs:
finalize-merge-to-main: finalize-merge-to-main:
name: Finalize Merge to Main name: Finalize Merge to Main
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: [test-standard, test-fuzz, test-live] needs: [test-standard, test-live, test-fuzz]
if: startsWith(github.ref, 'refs/heads/temp/merge-') if: startsWith(github.ref, 'refs/heads/temp/merge-')
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
@@ -148,7 +148,7 @@ jobs:
run: | run: |
git fetch origin main git fetch origin main
git checkout main git checkout main
git merge ${{ github.ref }} --no-ff -m "ci: auto-merge testing → main [skip ci]" git merge ${{ github.ref }} --no-ff -m "ci: auto-merge testing → main"
git push origin main git push origin main
echo "--- Cleaning up temp branch ---" echo "--- Cleaning up temp branch ---"
git push origin --delete ${{ github.ref_name }} git push origin --delete ${{ github.ref_name }}

View File

@@ -22,27 +22,38 @@ jobs:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
token: ${{ secrets.DECNET_PR_TOKEN }}
- name: Extract version from pyproject.toml - name: Configure git
run: |
git config user.name "DECNET CI"
git config user.email "ci@decnet.local"
- name: Bump version and Tag
id: version id: version
run: | run: |
VERSION=$(python3 -c "import tomllib; f=open('pyproject.toml','rb'); d=tomllib.load(f); print(d['project']['version'])") # Calculate next version (v0.x)
echo "version=$VERSION" >> $GITHUB_OUTPUT LATEST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.0")
NEXT_VER=$(python3 -c "
- name: Create tag if not exists tag = '$LATEST_TAG'.lstrip('v')
id: tag parts = tag.split('.')
run: | major = int(parts[0]) if parts[0] else 0
VERSION=${{ steps.version.outputs.version }} minor = int(parts[1]) if len(parts) > 1 else 0
if git rev-parse "v$VERSION" >/dev/null 2>&1; then print(f'{major}.{minor + 1}')
echo "Tag v$VERSION already exists, skipping." ")
echo "created=false" >> $GITHUB_OUTPUT
else echo "Next version: $NEXT_VER (calculated from $LATEST_TAG)"
git config user.name "gitea-actions"
git config user.email "actions@git.resacachile.cl" # Update pyproject.toml
git tag -a "v$VERSION" -m "Release v$VERSION" sed -i "s/^version = \".*\"/version = \"$NEXT_VER\"/" pyproject.toml
git push origin "v$VERSION"
echo "created=true" >> $GITHUB_OUTPUT git add pyproject.toml
fi git commit -m "chore: auto-release v$NEXT_VER [skip ci]" || echo "No changes to commit"
git tag -a "v$NEXT_VER" -m "Auto-release v$NEXT_VER"
git push origin main --follow-tags
echo "version=$NEXT_VER" >> $GITHUB_OUTPUT
echo "created=true" >> $GITHUB_OUTPUT
docker: docker:
name: Build, scan & push ${{ matrix.service }} name: Build, scan & push ${{ matrix.service }}
@@ -52,7 +63,7 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
service: service:
- cowrie - conpot
- docker_api - docker_api
- elasticsearch - elasticsearch
- ftp - ftp
@@ -69,11 +80,12 @@ jobs:
- postgres - postgres
- rdp - rdp
- redis - redis
- real_ssh
- sip - sip
- smb - smb
- smtp - smtp
- snmp - snmp
- ssh
- telnet
- tftp - tftp
- vnc - vnc
steps: steps: