generated from athackst/vscode_ros2_workspace
-
Notifications
You must be signed in to change notification settings - Fork 2
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
1 parent
168ae10
commit a74672b
Showing
2 changed files
with
55 additions
and
3 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,35 @@ | ||
# adapted from https://github.com/microsoft/vscode-dev-containers/blob/main/containers/javascript-node-mongo/.devcontainer/docker-compose.yml | ||
# Note: the "ports" property in this file will not forward from a codespace; add to "forwardPorts" in devcontainer.json instead | ||
version: '3.8' | ||
|
||
services: | ||
sailbot-workspace: | ||
build: | ||
context: . | ||
dockerfile: ../../.devcontainer/Dockerfile | ||
volumes: | ||
- ../..:/workspaces/sailbot_workspace:cached | ||
|
||
# Overrides default command so things don't shut down after the process ends. | ||
command: sleep infinity | ||
|
||
# From run arguments of template repository | ||
cap_add: | ||
- SYS_PTRACE | ||
security_opt: | ||
- seccomp:unconfined | ||
- apparmor:unconfined | ||
|
||
# URL: mongodb://localhost:27017 | ||
mongodb: | ||
image: mongo:latest | ||
restart: unless-stopped | ||
|
||
# Runs on the same network as the workspace container, allows "forwardPorts" in devcontainer.json function. | ||
network_mode: service:sailbot-workspace | ||
|
||
# Uncomment to change startup options | ||
# environment: | ||
# MONGO_INITDB_ROOT_USERNAME: root | ||
# MONGO_INITDB_ROOT_PASSWORD: example | ||
# MONGO_INITDB_DATABASE: your-database-here |
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 |
---|---|---|
@@ -1,6 +1,23 @@ | ||
name: 'Test' | ||
description: 'Test using devcontainer' | ||
runs: | ||
using: 'docker' | ||
image: '../../../.devcontainer/Dockerfile' | ||
entrypoint: ".github/actions/test/run.sh" | ||
using: "composite" | ||
steps: | ||
- name: List | ||
shell: bash | ||
run: ls | ||
|
||
- name: Build | ||
shell: bash | ||
run: docker-compose -f ../docker-compose.ci.yml build | ||
|
||
- name: Run | ||
shell: bash | ||
run: docker-compose -f ../docker-compose.ci.yml up -d | ||
|
||
- name: Test | ||
shell: bash | ||
run: | | ||
docker-compose -f ../docker-compose.ci.yml exec -u ros sailbot-workspace /bin/bash | ||
cd /workspaces/sailbot_workspace | ||
.github/actions/test/run.sh |