-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Updates collection for compatibility with Nautobot 2.0 * Release 5.0.0 (#253) * Prepare for release 5.0.0 Co-authored-by: Joe Wesch <10467633+joewesch@users.noreply.github.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Joe Wesch <joe.wesch@networktocode.com> Co-authored-by: Josh VanDeraa <jv@networktocode.com> Co-authored-by: Noah Robin <noahr@nvidia.com> Co-authored-by: Joe Wesch <10467633+joewesch@users.noreply.github.com>
- Loading branch information
1 parent
8ee04ff
commit a45222b
Showing
237 changed files
with
10,794 additions
and
12,835 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,47 @@ | ||
--- | ||
name: "Integration Tests" | ||
on: # yamllint disable | ||
workflow_call: | ||
inputs: | ||
runs-on: | ||
description: "The OS to run the job on" | ||
required: false | ||
default: "ubuntu-22.04" | ||
type: string | ||
python-version: | ||
description: "The Python version to use" | ||
required: true | ||
type: string | ||
nautobot-version: | ||
description: "The Nautobot version to use" | ||
required: true | ||
type: string | ||
ansible-version: | ||
description: "The Ansible version to use" | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
integration: | ||
runs-on: "${{ inputs.runs-on }}" | ||
env: | ||
INVOKE_NAUTOBOT_ANSIBLE_PYTHON_VER: "${{ inputs.python-version }}" | ||
INVOKE_NAUTOBOT_ANSIBLE_NAUTOBOT_VER: "${{ inputs.nautobot-version }}" | ||
steps: | ||
- name: "Check out repository code" | ||
uses: "actions/checkout@v3" | ||
- name: "Set up Python" | ||
uses: "actions/setup-python@v3" | ||
with: | ||
python-version: "${{ inputs.python-version }}" | ||
- name: "Install invoke" | ||
run: "pip install -U pip && pip install invoke" | ||
- name: "Install poetry" | ||
run: "curl -sSL https://install.python-poetry.org | python3 -" | ||
- name: "Install ansible-core" | ||
# This ensures that even if the poetry.lock file updates we still test the right version | ||
run: "poetry add ansible-core@~${{ inputs.ansible-version }}" | ||
- name: "Start containers" | ||
run: "invoke start" | ||
- name: "Tests" | ||
run: "invoke integration" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
--- | ||
name: "Tests" | ||
on: # yamllint disable | ||
workflow_call: | ||
inputs: | ||
runs-on: | ||
description: "The OS to run the job on" | ||
required: false | ||
default: "ubuntu-22.04" | ||
type: string | ||
full-integration: | ||
description: "Run full integration tests" | ||
required: false | ||
default: false | ||
type: boolean | ||
|
||
jobs: | ||
lint: | ||
runs-on: "${{ inputs.runs-on }}" | ||
steps: | ||
- name: "Check out repository code" | ||
uses: "actions/checkout@v3" | ||
- name: "Install invoke" | ||
run: "pip install -U pip && pip install invoke" | ||
- name: "Linting" | ||
run: "invoke lint" | ||
unit: | ||
runs-on: "${{ inputs.runs-on }}" | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: | ||
- "3.9" | ||
- "3.10" | ||
- "3.11" | ||
env: | ||
INVOKE_NAUTOBOT_ANSIBLE_PYTHON_VER: "${{ matrix.python-version }}" | ||
steps: | ||
- name: "Check out repository code" | ||
uses: "actions/checkout@v3" | ||
- name: "Install invoke" | ||
run: "pip install -U pip && pip install invoke" | ||
- name: "Tests" | ||
run: "invoke unit" | ||
needs: | ||
- "lint" | ||
integration_partial: | ||
# Only run a subset of integration tests on normal PRs | ||
if: ${{ inputs.full-integration == false }} | ||
uses: ./.github/workflows/integration_tests.yml | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: | ||
- "3.9" | ||
nautobot-version: | ||
- "2.0.0" | ||
ansible-version: | ||
- "2.14" | ||
- "2.15" | ||
with: | ||
python-version: "${{ matrix.python-version }}" | ||
nautobot-version: "${{ matrix.nautobot-version }}" | ||
ansible-version: "${{ matrix.ansible-version }}" | ||
needs: | ||
- "unit" | ||
integration_full: | ||
if: ${{ inputs.full-integration == true }} | ||
uses: ./.github/workflows/integration_tests.yml | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: | ||
- "3.9" | ||
- "3.10" | ||
- "3.11" | ||
nautobot-version: | ||
- "2.0.0" | ||
ansible-version: | ||
- "2.14" | ||
- "2.15" | ||
with: | ||
python-version: "${{ matrix.python-version }}" | ||
nautobot-version: "${{ matrix.nautobot-version }}" | ||
ansible-version: "${{ matrix.ansible-version }}" | ||
needs: | ||
- "unit" |
14 changes: 6 additions & 8 deletions
14
.github/workflows/ci.yml → .github/workflows/trigger_pr_main.yml
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 |
---|---|---|
@@ -1,17 +1,15 @@ | ||
--- | ||
name: "CI" | ||
name: "Pull Requests (main)" | ||
concurrency: # Cancel any existing runs of this workflow for this same PR | ||
group: "${{ '{{ github.workflow }}' }}-${{ '{{ github.ref }}' }}" | ||
cancel-in-progress: true | ||
on: # yamllint disable | ||
push: | ||
pull_request: | ||
branches: | ||
- "develop" | ||
- "main" | ||
pull_request: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
ci: | ||
uses: ./.github/workflows/jobs.yml | ||
tests: | ||
uses: ./.github/workflows/tests.yml | ||
with: | ||
full-integration: true |
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,15 @@ | ||
--- | ||
name: "Pull Requests (normal)" | ||
concurrency: # Cancel any existing runs of this workflow for this same PR | ||
group: "${{ '{{ github.workflow }}' }}-${{ '{{ github.ref }}' }}" | ||
cancel-in-progress: true | ||
on: # yamllint disable | ||
pull_request: | ||
branches-ignore: | ||
- "main" | ||
|
||
jobs: | ||
tests: | ||
uses: ./.github/workflows/tests.yml | ||
with: | ||
full-integration: false |
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,55 @@ | ||
--- | ||
name: "Release" | ||
on: # yamllint disable | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
tests: | ||
uses: ./.github/workflows/tests.yml | ||
with: | ||
full-integration: true | ||
publish_github: | ||
name: "Publish to GitHub" | ||
runs-on: "${{ inputs.runs-on }}" | ||
if: "startsWith(github.ref, 'refs/tags/v')" | ||
steps: | ||
- name: "Check out repository code" | ||
uses: "actions/checkout@v3" | ||
- name: "Set up Python" | ||
uses: "actions/setup-python@v3" | ||
with: | ||
python-version: "3.9" | ||
- name: "Install Python Packages" | ||
run: "pip install ansible-core" | ||
- name: "Build the collection" | ||
run: "ansible-galaxy collection build --output-path build" | ||
- name: "Upload binaries to release" | ||
uses: "svenstaro/upload-release-action@v2" | ||
with: | ||
repo_token: "${{ secrets.GH_NAUTOBOT_BOT_TOKEN }}" | ||
file: "build/*" | ||
tag: "${{ github.ref }}" | ||
overwrite: true | ||
file_glob: true | ||
needs: | ||
- "tests" | ||
publish_galaxy: | ||
name: "Publish to Ansible Galaxy" | ||
runs-on: "${{ inputs.runs-on }}" | ||
if: "startsWith(github.ref, 'refs/tags/v')" | ||
steps: | ||
- name: "Check out repository code" | ||
uses: "actions/checkout@v3" | ||
- name: "Set up Python" | ||
uses: "actions/setup-python@v3" | ||
with: | ||
python-version: "3.9" | ||
- name: "Install Python Packages" | ||
run: "pip install ansible-core" | ||
- name: "Build the collection" | ||
run: "ansible-galaxy collection build --output-path build" | ||
- name: "Publish the collection" | ||
run: "ansible-galaxy collection publish build/* --api-key=${{ secrets.GALAXY_API_TOKEN }}" | ||
needs: | ||
- "tests" |
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.