Skip to content

Updates to v1.0.0

Updates to v1.0.0 #12

Workflow file for this run

name: CI
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
on:
push:
branches: [main]
tags: ["v*"]
pull_request:
branches: [main]
jobs:
lint:
name: Lint (ruff)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/ruff-action@v3
with:
args: "check"
test:
name: Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"
- name: Install CPU-only PyTorch (saves ~1.5GB)
run: pip install torch --index-url https://download.pytorch.org/whl/cpu
- name: Install dependencies
run: pip install -r requirements.txt
- name: Ingest docs into ChromaDB (needed for RAG tests)
run: python ingest.py
env:
NETBOX_URL: ""
- name: Run automated tests
run: python -m pytest testing/automated/ -v --tb=short --timeout=30
# ── Release ──────────────────────────────────────────────────────────────
# Triggered only on version tags (e.g. v1.1.0).
# Runs after CI passes, extracts the changelog section, creates a GitHub Release.
#
# Usage:
# git tag v1.1.0
# git push origin v1.1.0
release:
name: GitHub Release
if: startsWith(github.ref, 'refs/tags/v')
needs: [lint, test]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Extract version from tag
id: version
run: echo "tag=${GITHUB_REF#refs/tags/}" >> "$GITHUB_OUTPUT"
- name: Extract changelog for this version
id: changelog
run: |
semver="${{ steps.version.outputs.tag }}"
semver="${semver#v}"
awk "/^## v${semver}/{found=1; next} /^## v/{if(found) exit} found" CHANGELOG.md > /tmp/release_notes.md
cat /tmp/release_notes.md
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.version.outputs.tag }}
name: ${{ steps.version.outputs.tag }}
body_path: /tmp/release_notes.md