-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #222 from networktocode/develop-3.0
Merge 3.0 branch into develop
- Loading branch information
Showing
100 changed files
with
6,221 additions
and
1,020 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,178 @@ | ||
--- | ||
version: 2.1 | ||
aliases: | ||
- &linting_and_unit_tests | ||
- "linting" | ||
- "test" | ||
- &linting_test | ||
- "linting" | ||
- &unit_test | ||
- "test" | ||
executors: | ||
linux: | ||
docker: | ||
- image: "circleci/python:3.7.10" | ||
orbs: | ||
# The python orb contains a set of prepackaged CircleCI configuration you can use repeatedly in your configuration | ||
# files | ||
# Orb commands and jobs help you with common scripting around a language/tool | ||
# so you dont have to copy and paste it everywhere. | ||
# See the orb documentation here: https://circleci.com/developer/orbs/orb/circleci/python | ||
python: "circleci/python@1.2" | ||
workflows: | ||
TestFlow: # This is the name of the workflow, feel free to change it to better match your workflow. | ||
# Inside the workflow, you define the jobs you want to run. | ||
# For more details on extending your workflow, see the configuration docs: | ||
# https://circleci.com/docs/2.0/configuration-reference/#workflows | ||
jobs: | ||
- "linting" | ||
- test: | ||
requires: *linting_test | ||
- "integration_nautobot": | ||
requires: *unit_test | ||
- "integration_netbox28": | ||
requires: *unit_test | ||
- "integration_netbox29": | ||
requires: *unit_test | ||
- "integration_netbox210": | ||
requires: *unit_test | ||
|
||
jobs: | ||
linting: | ||
docker: | ||
- image: "circleci/python:3.7.10" # primary container for the build job | ||
environment: | ||
INVOKE_LOCAL: "True" | ||
steps: | ||
- "checkout" | ||
# - python/install-packages: | ||
# pkg-manager: poetry | ||
- run: | ||
command: "pip install --upgrade wheel pip" | ||
name: "Upgrade Pip" | ||
- run: | ||
command: "pip install invoke poetry toml" | ||
name: "Install pip packages" | ||
- run: | ||
command: "poetry config virtualenvs.create false" | ||
name: "Poetry config virtual envs" | ||
- run: | ||
command: "poetry config installer.parallel false" | ||
name: "Poetry config parallel" | ||
- run: | ||
command: "poetry install --no-interaction --no-ansi --no-root" | ||
name: "Install application" | ||
- run: | ||
command: "invoke black" | ||
- run: | ||
command: "invoke bandit" | ||
- run: | ||
command: "invoke pydocstyle" | ||
- run: | ||
command: "invoke flake8" | ||
- run: | ||
command: "invoke yamllint" | ||
- run: | ||
command: "invoke pylint" | ||
test: | ||
machine: | ||
image: "ubuntu-2004:202104-01" | ||
steps: | ||
- "checkout" | ||
- run: | ||
name: "Change to Python 3.7 package on system" | ||
command: | | ||
pyenv versions | ||
pyenv global 3.9.4 | ||
which pip | ||
pip -V | ||
- run: | ||
name: "Install python packages" | ||
command: "pip install --upgrade wheel pip toml invoke" | ||
- run: | ||
name: "Build Test Image" | ||
command: "invoke build-image --nocache" | ||
- run: | ||
name: "Run Unit Tests" | ||
command: "invoke pytest" | ||
integration_nautobot: | ||
machine: | ||
image: "ubuntu-2004:202104-01" | ||
steps: | ||
- "checkout" | ||
- run: | ||
name: "Nautobot Test" | ||
command: | | ||
pyenv versions | ||
pyenv global 3.9.4 | ||
which pip | ||
pip -V | ||
pip install --upgrade pip wheel | ||
pip install invoke toml poetry pynautobot ansible==2.10.7 | ||
ansible-galaxy collection install networktocode.nautobot | ||
poetry config virtualenvs.create false | ||
poetry config installer.parallel false | ||
poetry install | ||
invoke nautobot-integration-tests | ||
environment: | ||
NAUTOBOT_VERSION: "1.0.1" | ||
integration_netbox210: | ||
machine: | ||
image: "ubuntu-2004:202104-01" | ||
steps: | ||
- "checkout" | ||
- run: | ||
name: "NetBox 2.10 Test" | ||
command: | | ||
pyenv versions | ||
pyenv global 3.9.4 | ||
which pip | ||
pip -V | ||
pip install invoke toml poetry pynetbox ansible==2.10.7 | ||
ansible-galaxy collection install git+https://github.com/netbox-community/ansible_modules.git,v3.0.0 | ||
poetry config virtualenvs.create false | ||
poetry config installer.parallel false | ||
poetry install | ||
invoke integration-tests | ||
environment: | ||
NETBOX_VERSION: "v2.10" | ||
integration_netbox29: | ||
machine: | ||
image: "ubuntu-2004:202104-01" | ||
steps: | ||
- "checkout" | ||
- run: | ||
name: "NetBox 2.9 Test" | ||
command: | | ||
pyenv versions | ||
pyenv global 3.9.4 | ||
which pip | ||
pip -V | ||
pip install invoke toml poetry pynetbox ansible==2.10.7 | ||
ansible-galaxy collection install git+https://github.com/netbox-community/ansible_modules.git,v3.0.0 | ||
poetry config virtualenvs.create false | ||
poetry config installer.parallel false | ||
poetry install | ||
invoke integration-tests | ||
environment: | ||
NETBOX_VERSION: "v2.9" | ||
integration_netbox28: | ||
machine: | ||
image: "ubuntu-2004:202104-01" | ||
steps: | ||
- "checkout" | ||
- run: | ||
name: "NetBox 2.8 Test" | ||
command: | | ||
pyenv versions | ||
pyenv global 3.9.4 | ||
which pip | ||
pip -V | ||
pip install invoke toml poetry pynetbox ansible==2.10.7 | ||
ansible-galaxy collection install git+https://github.com/netbox-community/ansible_modules.git,v3.0.0 | ||
poetry config virtualenvs.create false | ||
poetry config installer.parallel false | ||
poetry install | ||
invoke integration-tests | ||
environment: | ||
NETBOX_VERSION: "v2.8" |
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 |
---|---|---|
|
@@ -149,3 +149,4 @@ dmypy.json | |
.pyre/ | ||
|
||
*.env | ||
.vscode |
This file was deleted.
Oops, something went wrong.
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
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
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
Oops, something went wrong.