Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

workflows: Add server ci, upgrade to @v4 #336

Merged
merged 15 commits into from
Dec 1, 2024
48 changes: 38 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ jobs:
run:
working-directory: ./sdk
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Collect schema files from aas-specs
Expand Down Expand Up @@ -64,9 +64,9 @@ jobs:
run:
working-directory: ./sdk
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python ${{ env.X_PYTHON_VERSION }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ env.X_PYTHON_VERSION }}
- name: Install Python dependencies
Expand All @@ -87,9 +87,9 @@ jobs:
run:
working-directory: ./sdk
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python ${{ env.X_PYTHON_VERSION }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ env.X_PYTHON_VERSION }}
- name: Install Python dependencies
Expand All @@ -113,9 +113,9 @@ jobs:
run:
working-directory: ./sdk
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python ${{ env.X_PYTHON_VERSION }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ env.X_PYTHON_VERSION }}
- name: Install Python dependencies
Expand All @@ -134,9 +134,9 @@ jobs:
run:
working-directory: ./sdk
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python ${{ env.X_PYTHON_VERSION }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ env.X_PYTHON_VERSION }}
- name: Install dependencies
Expand All @@ -146,3 +146,31 @@ jobs:
- name: Create source and wheel dist
run: |
python -m build

server-package:
Frosty2500 marked this conversation as resolved.
Show resolved Hide resolved
# This job checks if we can build our server package
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./server
steps:
- uses: actions/checkout@v4
- name: Build the Docker image
run: |
docker build -t basyx-python-server .
- name: Run container
run: |
docker run -d --name basyx-python-server basyx-python-server
- name: Wait for container and server initialization
run: |
timeout 30s bash -c '
until docker logs basyx-python-server 2>&1 | grep -q "INFO success: quit_on_failure entered RUNNING state"; do
sleep 2
done
'
- name: Check if container is running
run: |
docker inspect --format='{{.State.Running}}' basyx-python-server | grep true
- name: Stop and remove the container
run: |
docker stop basyx-python-server && docker rm basyx-python-server