mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-02-04 07:51:50 +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
(cherry picked from commit 18c362eef4)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
16 lines
600 B
Bash
Executable file
16 lines
600 B
Bash
Executable file
#!/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
|