-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Description This PR adds a simple test for Room Manager. ## Motivation and Context Testing the build, health status and proper token retrieval allow for more confidence in merging new changes to Room Manager example and prevent bad images from ending up in Cloud panel. Fixes FCE-679 ## Types of changes - [x] tech debt remedy - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- Loading branch information
1 parent
db91337
commit 7280aa1
Showing
4 changed files
with
59 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Build and Test Room Manager on amd64 | ||
|
||
on: | ||
pull_request: | ||
branches: [main] | ||
paths: | ||
- 'examples/room-manager/**' | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
build-and-test-amd64-image: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v6 | ||
with: | ||
file: examples/room-manager/Dockerfile | ||
platforms: linux/amd64 | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
tags: room-manager:${{ github.event.pull_request.head.sha }} | ||
load: true | ||
- name: Run Room Manager | ||
run: | | ||
docker run -d -p 8080:8080 \ | ||
--name gh-runner-room-manager \ | ||
--restart always \ | ||
-e PORT=8080 \ | ||
-e PEERLESS_PURGE_TIMEOUT=600 \ | ||
-e FISHJAM_URL=${{ secrets.ROOM_MANAGER_FISHJAM_URL }} \ | ||
-e FISHJAM_SERVER_TOKEN=${{ secrets.ROOM_MANAGER_FISHJAM_SERVER_TOKEN }} \ | ||
room-manager:${{ github.event.pull_request.head.sha }} | ||
- name: Test Room Manager Healtcheck | ||
run: | | ||
sleep 2 | ||
curl -o tmp1.json -s -vvv http://127.0.0.1:8080/health | ||
jq . tmp1.json | ||
[[ $(jq -r .status tmp1.json) == "ok" ]] | ||
- name: Test Room Manager API | ||
run: | | ||
curl -o tmp2.json -s -vvv "http://127.0.0.1:8080/api/rooms?roomName=testRoomName&peerName=testPeerName" | ||
jq '{peerToken: .peerToken, room: .room, peer: .peer}' tmp2.json | ||
[[ $(jq -r .peerToken tmp2.json) != "null" ]] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.