-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
51 additions
and
0 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,14 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
mushr_noetic run 'source ~/.bashrc && roslaunch mushr_sim teleop.launch' > /tmp/output & | ||
sleep 5 | ||
if tail -n 1 /tmp/output | grep -q "Rosbridge WebSocket server started at ws://0.0.0.0:9090"; then | ||
echo "✅ smoke_test passed" | ||
exit 0; | ||
else | ||
# Print output of `roslaunch mushr_sim teleop.launch` for debugging | ||
cat /tmp/output | ||
echo "❌ smoke_test failed" | ||
exit 1; | ||
fi |
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,21 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
SRC_DIR="$(pwd)" | ||
|
||
echo "Running Smoke Test" | ||
|
||
# Build | ||
export DOCKER_BUILDKIT=1 | ||
echo "(*) Installing @devcontainer/cli" | ||
npm install -g @devcontainers/cli | ||
|
||
echo "Building Dev Container" | ||
ID_LABEL="test-container=mushr" | ||
devcontainer up --id-label ${ID_LABEL} --workspace-folder "${SRC_DIR}" | ||
|
||
# Test | ||
devcontainer exec --workspace-folder "${SRC_DIR}" --id-label ${ID_LABEL} /bin/sh -c './src/mushr/.devcontainer/smoke_test.sh' | ||
|
||
# Clean up | ||
docker rm -f $(docker container ls -f "label=${ID_LABEL}" -q) |
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,16 @@ | ||
name: "CI" | ||
on: | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout main | ||
id: checkout_release | ||
uses: actions/checkout@v3 | ||
- name: Devcontainer container smoke test | ||
id: test_devcontainer | ||
shell: bash | ||
run: ./.github/workflows/devcontainer-test.sh |