mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-03-26 21:33:12 +00:00
add devcontainer+pre-commit (#11328)
* add devcontainer support * chore(devcontainer): install test requirements * chore: add pre-commit * fix format of pre-commit config file * add licenses for the new files * Apply suggestions from code review * move requirements-dev.txt to inside .devcontainer * specify files for ruff * update CONTRIBUTING.md * chore(devcontainer): use standard image, no docker build * docs: format CONTRIBUTING.md (automatic by IDE) * Update .devcontainer/devcontainer.json * remove extraneous edits in CONTRIBUTING.md
This commit is contained in:
16
.devcontainer/setup.sh
Executable file
16
.devcontainer/setup.sh
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright (c) Ansible Project
|
||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
sudo chown -R vscode:vscode /workspace/
|
||||
|
||||
pip install -U pip
|
||||
pip install -r .devcontainer/requirements-dev.txt
|
||||
pip install -r tests/unit/requirements.txt
|
||||
|
||||
export ANSIBLE_COLLECTIONS_PATH=/workspace:${ANSIBLE_COLLECTIONS_PATH}
|
||||
ansible-galaxy collection install -v -r tests/unit/requirements.yml
|
||||
ansible-galaxy collection install -v -r tests/integration/requirements.yml
|
||||
|
||||
pre-commit install
|
||||
Reference in New Issue
Block a user