Skip to content

Commit

Permalink
workflows: Add server ci, upgrade to @v4 (#336)
Browse files Browse the repository at this point in the history
This expands the CI workflow to also test the 
server. For now, it only tests if the server 
can be build and run without error.

This also upgrades the `actions/checkout@v2` 
to the newer `actions/checkout@v4`.
  • Loading branch information
Frosty2500 authored Dec 1, 2024
1 parent 8cc72d7 commit f97c031
Showing 1 changed file with 38 additions and 10 deletions.
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:
# 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

0 comments on commit f97c031

Please sign in to comment.