Skip to content

docs: remove redundant sections from the Table of Contents in README.md #617

docs: remove redundant sections from the Table of Contents in README.md

docs: remove redundant sections from the Table of Contents in README.md #617

Workflow file for this run

name: Build Release
on:
push:
branches:
- "**"
permissions:
contents: write
jobs:
detect-project-changes:
name: Check for new version
runs-on: ubuntu-latest
outputs:
changed: ${{ steps.check.outputs.changed }}
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Check if pyproject.toml changed
id: check
run: |
if git rev-parse HEAD^ >/dev/null 2>&1; then
CHANGED_FILES="$(git diff --name-only HEAD^ HEAD)"
else
echo "No parent commit found, using full file list"
CHANGED_FILES="$(git ls-files)"
fi
echo "Changed files:"
echo "$CHANGED_FILES"
if echo "$CHANGED_FILES" | grep -q '^pyproject\.toml$'; then
echo "pyproject.toml changed, marking as changed"
echo "changed=true" >> "$GITHUB_OUTPUT"
else
echo "pyproject.toml not changed, skipping release"
echo "changed=false" >> "$GITHUB_OUTPUT"
fi
client-aas-env-tests:
name: Client AAS Env Tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest
- name: Start server infrastructure
run: docker compose -f .github/docker-compose-env.yaml up -d --build
- name: Wait for infrastructure to be healthy
run: |
echo "Waiting for services..."
wait_for() {
NAME=$1
URL=$2
echo "Waiting for $NAME at $URL"
for i in {1..60}; do
if curl -sSf "$URL" >/dev/null; then
echo "$NAME is ready."
return 0
fi
sleep 2
done
echo "❌ Timeout waiting for $NAME"
docker ps -a
exit 1
}
wait_for "Java AAS" "http://localhost:8075/shells"
wait_for "dotNet AAS" "http://localhost:5043/shells"
wait_for "Python AAS" "http://localhost:5080/shells"
- name: Run client tests
run: pytest -v tests/test_client.py
- name: Dump logs on failure
if: failure()
run: |
echo "======== Dumping container logs =========="
for c in $(docker ps -a --format '{{.Names}}'); do
echo "------------- $c -------------"
docker logs $c || true
done
- name: Tear down
run: docker compose -f .github/docker-compose-env.yaml down
wrapper-aas-env-tests:
name: Wrapper AAS Env Tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest
- name: Start server infrastructure
run: docker compose -f .github/docker-compose-env.yaml up -d --build
- name: Wait for infrastructure to be healthy
run: |
echo "Waiting for services..."
wait_for() {
NAME=$1
URL=$2
echo "Waiting for $NAME at $URL"
for i in {1..60}; do
if curl -sSf "$URL" >/dev/null; then
echo "$NAME is ready."
return 0
fi
sleep 2
done
echo "❌ Timeout waiting for $NAME"
docker ps -a
exit 1
}
wait_for "Java AAS" "http://localhost:8075/shells"
wait_for "dotNet AAS" "http://localhost:5043/shells"
wait_for "Python AAS" "http://localhost:5080/shells"
- name: Run wrapper tests
run: pytest -v tests/test_wrapper.py
- name: Dump logs on failure
if: failure()
run: |
echo "======== Dumping container logs =========="
for c in $(docker ps -a --format '{{.Names}}'); do
echo "------------- $c -------------"
docker logs $c || true
done
- name: Tear down
run: docker compose -f .github/docker-compose-env.yaml down
client-registry-tests:
name: Client AAS Registry Tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest
- name: Start server infrastructure
run: docker compose -f .github/docker-compose-reg.yaml up -d --build
- name: Wait for infrastructure to be healthy
run: |
echo "Waiting for services..."
wait_for() {
NAME=$1
URL=$2
echo "Waiting for $NAME at $URL"
for i in {1..60}; do
if curl -sSf "$URL" >/dev/null; then
echo "$NAME is ready."
return 0
fi
sleep 2
done
echo "❌ Timeout waiting for $NAME"
docker ps -a
exit 1
}
wait_for "Java AAS" "http://localhost:8075/shells"
wait_for "dotNet AAS" "http://localhost:5043/shells"
wait_for "Python AAS" "http://localhost:5080/shells"
wait_for "AAS Registry" "http://localhost:8076/shell-descriptors"
wait_for "SM Registry" "http://localhost:8077/submodel-descriptors"
- name: Run client tests
run: pytest -v tests/test_client_reg.py
- name: Dump logs on failure
if: failure()
run: |
echo "======== Dumping container logs =========="
for c in $(docker ps -a --format '{{.Names}}'); do
echo "------------- $c -------------"
docker logs $c || true
done
- name: Tear down
run: docker compose -f .github/docker-compose-reg.yaml down
publish-pypi-package:
name: Publish PyPI Package
if: github.ref == 'refs/heads/main' && needs.detect-project-changes.outputs.changed == 'true'
runs-on: ubuntu-latest
needs:
[
client-aas-env-tests,
wrapper-aas-env-tests,
client-registry-tests,
detect-project-changes,
]
steps:
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.10"
- name: Install build tools
run: |
python -m pip install --upgrade pip
pip install build twine
- name: Build package
run: python -m build
- name: Upload package as artifact
uses: actions/upload-artifact@v7
with:
name: pypi-dist
path: dist/*
- name: Publish to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: twine upload dist/*
github-release:
name: Create GitHub Release
runs-on: ubuntu-latest
needs: publish-pypi-package
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Download package artifact
uses: actions/download-artifact@v7
with:
name: pypi-dist
path: dist
- name: Extract version from pyproject.toml
id: get_version
run: |
VERSION=$(python -c "import tomllib; print(tomllib.load(open('pyproject.toml','rb'))['project']['version'])")
echo "version=$VERSION" >> $GITHUB_OUTPUT
GIT_HASH=$(git rev-parse --short HEAD)
echo "hash=$GIT_HASH" >> $GITHUB_OUTPUT
- name: Get commit hash
id: get_hash
run: echo "hash=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
- name: Generate Changelog
id: changelog
uses: mikepenz/release-changelog-builder-action@v4
with:
configuration: .github/changelog-config.json
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Git Tag
run: |
VERSION_TAG="v${{ steps.get_version.outputs.version }}"
if git rev-parse "$VERSION_TAG" >/dev/null 2>&1; then
echo "Tag $VERSION_TAG already exists."
else
git tag "$VERSION_TAG"
git push origin "$VERSION_TAG"
fi
- name: Create GitHub Release
uses: softprops/action-gh-release@v3
with:
tag_name: v${{ steps.get_version.outputs.version }}
name: 🚀 Release v${{ steps.get_version.outputs.version }}
generate_release_notes: true
body: |
## 📝 Release Notes
**Version:** v${{ steps.get_version.outputs.version }}
**Commit:** `${{ steps.get_version.outputs.hash }}`
### 🧩 Build Information
- PyPI package: [`aas-http-client ${{ steps.get_version.outputs.version }}`](https://pypi.org/project/aas-http-client/${{ steps.get_version.outputs.version }})
- `pip install aas-http-client`
- [Changelog](docs/CHANGELOG.md)
- [Documentation](https://fluid40.github.io/aas-http-client/)
files: dist/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-doxygen-pages:
name: Create Documentation
runs-on: ubuntu-latest
needs: publish-pypi-package
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Make doxypy wrapper executable
run: chmod +x ./doxypy-wrapper.sh
- name: Install Doxygen and Graphviz
run: |
sudo apt-get update
sudo apt-get install -y doxygen graphviz
- name: Install Python filter (doxypypy)
run: |
python -m pip install --upgrade pip
pip install doxypypy
- name: Build Doxygen Documentation
run: doxygen Doxyfile
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./doc/html
user_name: "github-actions[bot]"
user_email: "github-actions[bot]@users.noreply.github.com"