Skip to content

Commit

Permalink
Maintenance: iOS 18.1 / Swift 6 compatibility, Fix Deprecations, Rudi…
Browse files Browse the repository at this point in the history
…mentary Fog Node CI testing, Bump Fog Node JS Dependencies (#74)

Rudimentary Fog Node CI testing, Bump Fog Node JS Dependencies

Repo wasn't really maintained in the last months, therefore lots of
things became a bit out of date.

- iOS 18.1 / Swift 6 compatibility
- Fix Deprecations
- Bump Fog Node JS dependencies
- Rudimentary Fog Node CI testing

--

--

By submitting creating this pull request, you agree to follow our [Code
of
Conduct](https://github.com/StanfordSpezi/.github/blob/main/CODE_OF_CONDUCT.md)
and [Contributing
Guidelines](https://github.com/StanfordSpezi/.github/blob/main/CONTRIBUTING.md):
- [x] I agree to follow the [Code of
Conduct](https://github.com/StanfordSpezi/.github/blob/main/CODE_OF_CONDUCT.md)
and [Contributing
Guidelines](https://github.com/StanfordSpezi/.github/blob/main/CONTRIBUTING.md).

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Paul Schmiedmayer <[email protected]>
  • Loading branch information
3 people committed Dec 16, 2024
1 parent ccf0e88 commit 862ef16
Show file tree
Hide file tree
Showing 16 changed files with 294 additions and 218 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,3 +139,61 @@ jobs:
coveragereports: 'SpeziLLM-iOS.xcresult SpeziLLM-visionOS.xcresult SpeziLLM-macOS.xcresult TestApp-iOS.xcresult TestApp-iPad.xcresult TestApp-visionOS.xcresult'
secrets:
token: ${{ secrets.CODECOV_TOKEN }}
buildandtest_fognode:
name: Build and Test Fog Node
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Set up Docker Compose
uses: docker/setup-buildx-action@v2
- name: Build and Start Docker Services
run: |
cd FogNode
docker compose -f docker-compose.dev.yml up --build -d
- name: Wait for Services to Start
run: |
cd FogNode
MAX_WAIT=30
WAIT_TIME=0
while [ "$(docker compose -f docker-compose.dev.yml ps --filter "status=running" | grep -c "Up")" -lt 4 ]; do
if [ $WAIT_TIME -ge $MAX_WAIT ]; then
echo "Timeout: Not all services are up after $MAX_WAIT seconds."
docker compose -f docker-compose.dev.yml ps
exit 1
fi
echo "Waiting for services to start... ($WAIT_TIME seconds elapsed)"
docker logs fognode-auth-service-1
sleep 1
WAIT_TIME=$((WAIT_TIME + 1))
done
echo "All services are up and running!"
- name: Verify Container Status
run: |
cd FogNode
# Check for problematic containers
EXITED_COUNT=$(docker compose -f docker-compose.dev.yml ps --filter "status=exited" -q | wc -l)
RESTARTING_COUNT=$(docker compose -f docker-compose.dev.yml ps --filter "status=restarting" -q | wc -l)
DEAD_COUNT=$(docker compose -f docker-compose.dev.yml ps --filter "status=dead" -q | wc -l)

# Log current counts for visibility
echo "Exited Containers: $EXITED_COUNT"
echo "Restarting Containers: $RESTARTING_COUNT"
echo "Dead Containers: $DEAD_COUNT"

# Fail if any problematic containers are detected
if [ "$EXITED_COUNT" -gt 0 ] || [ "$RESTARTING_COUNT" -gt 0 ] || [ "$DEAD_COUNT" -gt 0 ]; then
echo "Error: One or more containers are in a problematic state (exited, restarting, or dead)."
docker compose -f docker-compose.dev.yml logs
exit 1
fi

echo "All containers are running as expected."
- name: Stop and Remove Containers
if: always()
run: |
cd FogNode
docker compose -f docker-compose.dev.yml down --remove-orphans
2 changes: 1 addition & 1 deletion FogNode/auth/firebaseEmulator/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# SPDX-License-Identifier: MIT
#

FROM alpine:3.19
FROM node:22-alpine

LABEL org.opencontainers.image.authors="Philipp Zagar <[email protected]>" \
org.opencontainers.image.version="0.1" \
Expand Down
Loading

0 comments on commit 862ef16

Please sign in to comment.