Skip to content

Commit

Permalink
Merge pull request #896 from roflcoopter/feature/dev-container-improv…
Browse files Browse the repository at this point in the history
…ements

Mount config folder in repo to /config in devcontainer
  • Loading branch information
roflcoopter authored Jan 18, 2025
2 parents 2a60933 + 0183e8e commit ae3d18a
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 28 deletions.
9 changes: 9 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
},
"userEnvProbe": "loginInteractiveShell",
"runArgs": ["-e", "GIT_EDITOR=code --wait"],
"mounts": [
"source=${localWorkspaceFolder}/config,target=/config,type=bind,consistency=cached"
],
"customizations": {
"vscode": {
"extensions": [
Expand Down Expand Up @@ -85,6 +88,12 @@
"files.associations": {
"**/azure-pipelines/*.yml": "azure-pipelines",
"**/azure-pipelines/*.yaml": "azure-pipelines"
},
"search.exclude": {
"**/node_modules": true,
"**/build": true,
"**/.docusaurus": true,
"**/dist": true
}
}
}
Expand Down
8 changes: 0 additions & 8 deletions .devcontainer/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,6 @@ else
python3 -c "import viseron.config; viseron.config.create_default_config('$FILE')"
fi

# Create symlink to config file
FILE=/config/config.yaml
if test -f "$FILE"; then
echo "Config symlink already exists"
else
echo "Creating config symlink"
ln -s $WORKSPACE_DIR/config/config.yaml /config/config.yaml
fi

# Create .env.local
FILE=$WORKSPACE_DIR/frontend/.env.local
Expand Down
40 changes: 20 additions & 20 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
echo "key=${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ env.CACHE_VERSION }}-${{ hashFiles('.pre-commit-config.yaml') }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('requirements_test.txt') }}-${{ hashFiles('requirements_ci.txt') }}" >> $GITHUB_OUTPUT
- name: Restore Python virtual environment
id: cache-venv
uses: actions/cache@v3.0.11
uses: actions/cache@v4
with:
path: venv
key: ${{ steps.python-venv-cache-key.outputs.key }}
Expand Down Expand Up @@ -73,7 +73,7 @@ jobs:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Restore base Python virtual environment
id: cache-venv
uses: actions/cache@v3.0.11
uses: actions/cache@v4
with:
path: venv
key: ${{ needs.prepare-python-venv.outputs.python-venv-cache-key }}
Expand All @@ -91,7 +91,7 @@ jobs:
# Install pre-commit hooks into the cached virtual environment
- name: Restore pre-commit hooks
id: cache-pre-commit
uses: actions/cache@v3.0.11
uses: actions/cache@v4
with:
path: ${{ env.PRE_COMMIT_CACHE }}
key: ${{ steps.pre-commit-cache-key.outputs.key }}
Expand All @@ -116,7 +116,7 @@ jobs:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Restore base Python virtual environment
id: cache-venv
uses: actions/cache@v3.0.11
uses: actions/cache@v4
with:
path: venv
key: ${{ needs.prepare-python-venv.outputs.python-venv-cache-key }}
Expand All @@ -127,7 +127,7 @@ jobs:
exit 1
- name: Restore pre-commit environment from cache
id: cache-pre-commit
uses: actions/cache@v3.0.11
uses: actions/cache@v4
with:
path: ${{ env.PRE_COMMIT_CACHE }}
key: ${{ needs.prepare-pre-commit.outputs.pre-commit-cache-key }}
Expand Down Expand Up @@ -156,7 +156,7 @@ jobs:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Restore base Python virtual environment
id: cache-venv
uses: actions/cache@v3.0.11
uses: actions/cache@v4
with:
path: venv
key: ${{ needs.prepare-python-venv.outputs.python-venv-cache-key }}
Expand All @@ -167,7 +167,7 @@ jobs:
exit 1
- name: Restore pre-commit environment from cache
id: cache-pre-commit
uses: actions/cache@v3.0.11
uses: actions/cache@v4
with:
path: ${{ env.PRE_COMMIT_CACHE }}
key: ${{ needs.prepare-pre-commit.outputs.pre-commit-cache-key }}
Expand Down Expand Up @@ -196,7 +196,7 @@ jobs:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Restore base Python virtual environment
id: cache-venv
uses: actions/cache@v3.0.11
uses: actions/cache@v4
with:
path: venv
key: ${{ needs.prepare-python-venv.outputs.python-venv-cache-key }}
Expand All @@ -207,7 +207,7 @@ jobs:
exit 1
- name: Restore pre-commit environment from cache
id: cache-pre-commit
uses: actions/cache@v3.0.11
uses: actions/cache@v4
with:
path: ${{ env.PRE_COMMIT_CACHE }}
key: ${{ needs.prepare-pre-commit.outputs.pre-commit-cache-key }}
Expand Down Expand Up @@ -236,7 +236,7 @@ jobs:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Restore base Python virtual environment
id: cache-venv
uses: actions/cache@v3.0.11
uses: actions/cache@v4
with:
path: venv
key: ${{ needs.prepare-python-venv.outputs.python-venv-cache-key }}
Expand All @@ -247,7 +247,7 @@ jobs:
exit 1
- name: Restore pre-commit environment from cache
id: cache-pre-commit
uses: actions/cache@v3.0.11
uses: actions/cache@v4
with:
path: ${{ env.PRE_COMMIT_CACHE }}
key: ${{ needs.prepare-pre-commit.outputs.pre-commit-cache-key }}
Expand Down Expand Up @@ -277,7 +277,7 @@ jobs:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Restore base Python virtual environment
id: cache-venv
uses: actions/cache@v3.0.11
uses: actions/cache@v4
with:
path: venv
key: ${{ needs.prepare-python-venv.outputs.python-venv-cache-key }}
Expand All @@ -288,7 +288,7 @@ jobs:
exit 1
- name: Restore pre-commit environment from cache
id: cache-pre-commit
uses: actions/cache@v3.0.11
uses: actions/cache@v4
with:
path: ${{ env.PRE_COMMIT_CACHE }}
key: ${{ needs.prepare-pre-commit.outputs.pre-commit-cache-key }}
Expand Down Expand Up @@ -322,7 +322,7 @@ jobs:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Restore base Python virtual environment
id: cache-venv
uses: actions/cache@v3.0.11
uses: actions/cache@v4
with:
path: venv
key: ${{ needs.prepare-python-venv.outputs.python-venv-cache-key }}
Expand All @@ -333,7 +333,7 @@ jobs:
exit 1
- name: Restore pre-commit environment from cache
id: cache-pre-commit
uses: actions/cache@v3.0.11
uses: actions/cache@v4
with:
path: ${{ env.PRE_COMMIT_CACHE }}
key: ${{ needs.prepare-pre-commit.outputs.pre-commit-cache-key }}
Expand Down Expand Up @@ -362,7 +362,7 @@ jobs:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Restore base Python virtual environment
id: cache-venv
uses: actions/cache@v3.0.11
uses: actions/cache@v4
with:
path: venv
key: ${{ needs.prepare-python-venv.outputs.python-venv-cache-key }}
Expand All @@ -373,7 +373,7 @@ jobs:
exit 1
- name: Restore pre-commit environment from cache
id: cache-pre-commit
uses: actions/cache@v3.0.11
uses: actions/cache@v4
with:
path: ${{ env.PRE_COMMIT_CACHE }}
key: ${{ needs.prepare-pre-commit.outputs.pre-commit-cache-key }}
Expand Down Expand Up @@ -404,7 +404,7 @@ jobs:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Restore base Python virtual environment
id: cache-venv
uses: actions/cache@v3.0.11
uses: actions/cache@v4
with:
path: venv
key: ${{ needs.prepare-python-venv.outputs.python-venv-cache-key }}
Expand Down Expand Up @@ -451,7 +451,7 @@ jobs:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Restore base Python virtual environment
id: cache-venv
uses: actions/cache@v3.0.11
uses: actions/cache@v4
with:
path: venv
key: ${{ needs.prepare-python-venv.outputs.python-venv-cache-key }}
Expand All @@ -462,7 +462,7 @@ jobs:
exit 1
- name: Restore pre-commit environment from cache
id: cache-pre-commit
uses: actions/cache@v3.0.11
uses: actions/cache@v4
with:
path: ${{ env.PRE_COMMIT_CACHE }}
key: ${{ needs.prepare-pre-commit.outputs.pre-commit-cache-key }}
Expand Down

0 comments on commit ae3d18a

Please sign in to comment.