Skip to content

Commit

Permalink
Fully automate dev setup with Gitpod
Browse files Browse the repository at this point in the history
This commit implements a fully-automated development setup using Gitpod.io, an
online IDE for GitLab, GitHub, and Bitbucket that enables Dev-Environments-As-Code.
This makes it easy for anyone to get a ready-to-code workspace for any branch,
issue or pull request almost instantly with a single click.

Includes vscode gitpod config for debugging and testing.
  • Loading branch information
mvdbeek committed Mar 1, 2021
1 parent 5776d78 commit d0f6dbb
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
github:
prebuilds:
# enable for the master/default branch (defaults to true)
master: true
# enable for all branches in this repo (defaults to false)
branches: true
# enable for pull requests coming from this repo (defaults to true)
pullRequests: true
# enable for pull requests coming from forks (defaults to false)
pullRequestsFromForks: true
# add a "Review in Gitpod" button as a comment to pull requests (defaults to true)
addComment: false
# add a "Review in Gitpod" button to pull requests (defaults to false)
addBadge: false
# add a label once the prebuild is ready to pull requests (defaults to false)
addLabel: false
image: gitpod/workspace-postgres
tasks:
- init: >
cp .vscode/settings_gitpod.json .vscode/settings.json &&
cp .vscode/launch_gitpod.json .vscode/launch.json &&
pip install psycopg2 &&
pip install -r lib/galaxy/dependencies/dev-requirements.txt &&
createdb galaxy &&
make client
- command: cp config/galaxy.yml.sample config/galaxy.yml
- command: make client-watch
# Ports to expose on workspace startup (optional)
ports:
- port: 8000
vscode:
extensions:
- ms-python.python
- ms-python.vscode-pylance
1 change: 1 addition & 0 deletions .vscode/.test.env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
GALAXY_TEST_TOOL_CONF="lib/galaxy/config/sample/tool_conf.xml.sample,test/functional/tools/samples_tool_conf.xml"
32 changes: 32 additions & 0 deletions .vscode/launch_gitpod.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "GalaxyFastAPI uvicorn",
"type": "python",
"request": "launch",
"module": "uvicorn",
"args": ["--app-dir", "lib", "--factory", "galaxy.webapps.galaxy.fast_factory:factory"],
"env": {
"GALAXY_CONFIG_FILE": "${workspaceFolder}/config/galaxy.yml",
"GALAXY_CONDA_AUTO_INIT": "false",
"GALAXY_CONFIG_TOOL_CONFIG_FILE": "lib/galaxy/config/sample/tool_conf.xml.sample,test/functional/tools/samples_tool_conf.xml",
"GALAXY_CONFIG_DATABASE_CONNECTION": "postgresql://localhost/galaxy"
}
},
{
"name": "Tool test framework",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/.venv/bin/pytest",
"args": [
"test/functional/test_toolbox_pytest.py",
"-m",
"tool",
"-k",
"job_properties_test_2"
]
}
]
}

13 changes: 13 additions & 0 deletions .vscode/settings_gitpod.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"python.testing.pytestArgs": [
"--doctest-modules",
"lib/galaxy_test/api/",
"lib/galaxy/datatypes",
"test/unit",
"test/integration",
"lib/galaxy_test/selenium/"
],
"python.testing.pytestEnabled": true,
"python.envFile": "${workspaceFolder}/.vscode/.test.env"
}

0 comments on commit d0f6dbb

Please sign in to comment.