Skip to content

test: add simulator-common and startup logger coverage #29

test: add simulator-common and startup logger coverage

test: add simulator-common and startup logger coverage #29

name: Dependency Submission (Maven)
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: write
packages: read
jobs:
submit-dependencies:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: "21"
distribution: "temurin"
- name: Configure Maven settings.xml
uses: s4u/maven-settings-action@v4.0.0
with:
path: ${{ github.workspace }}/settings.xml
servers: |
[{
"id": "fiberoptics-das-public-schemas",
"username": "${{ secrets.PUBLIC_SCHEMA_USER }}",
"password": "${{ secrets.PUBLIC_SCHEMA_TOKEN }}"
}]
- name: Validate Maven settings.xml
run: |
python3 - <<'PY'
import sys
import xml.etree.ElementTree as ET
tree = ET.parse("settings.xml")
root = tree.getroot()
ns = {"m": root.tag.split("}")[0].strip("{")} if "}" in root.tag else {}
def find(path):
return root.find(path, ns) if ns else root.find(path)
def findall(path):
return root.findall(path, ns) if ns else root.findall(path)
servers = findall(".//m:servers/m:server" if ns else ".//servers/server")
for s in servers:
sid = s.findtext("m:id" if ns else "id", default="").strip()
if sid == "fiberoptics-das-public-schemas":
user = s.findtext("m:username" if ns else "username", default="").strip()
pw = s.findtext("m:password" if ns else "password", default="").strip()
if not user or not pw:
print("settings.xml has empty username/password for fiberoptics-das-public-schemas", file=sys.stderr)
sys.exit(1)
print("settings.xml looks OK")
sys.exit(0)
print("settings.xml missing server fiberoptics-das-public-schemas", file=sys.stderr)
sys.exit(1)
PY
- name: Submit dependency snapshot
uses: actions/maven-dependency-submission-action@c7818038197dfab7dc48236d43a81d439a84a5f7
with:
settings-file: ${{ github.workspace }}/settings.xml
ignore-maven-wrapper: true
maven-args: -DskipTests