-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run latest pylint-nautobot #3
Open
snaselj
wants to merge
14
commits into
develop
Choose a base branch
from
u/snaselj-napps-250-latest-pylint-nautobot
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
cb301cf
feat: Improve `invoke pylint` to run with the latest `pylint-nautobot`
snaselj 2db3bf7
wip: Test workflow
snaselj 24402c0
chore: Linter
snaselj 533a567
Merge remote-tracking branch 'origin/develop' into u/snaselj-napps-25…
snaselj 5f94dbd
wip: Linters
snaselj 9056913
wip: --ref
snaselj 8211516
wip: run in docker
snaselj ab37793
wip: APP_NAME
snaselj 5d5327a
wip: Slack
snaselj de5e195
fix: Use failure
snaselj aa3e50c
chore: Removed Slack notification
snaselj cb0624d
fix: Action branch
snaselj 8b7bbe2
Merge remote-tracking branch 'origin/develop' into u/snaselj-napps-25…
snaselj 1727df0
cleanup
snaselj File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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: "Latest pylint-nautobot" | ||
|
||
on: # yamllint disable-line rule:truthy rule:comments | ||
schedule: | ||
- cron: "0 3 */2 * *" # every other day at 3am | ||
|
||
env: | ||
APP_NAME: "nautobot-app-dev-example" | ||
|
||
jobs: | ||
latest-pylint-nautobot: | ||
runs-on: "ubuntu-22.04" | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
python-version: ["3.11"] | ||
nautobot-version: ["stable"] | ||
env: | ||
INVOKE_NAUTOBOT_DEV_EXAMPLE_PYTHON_VER: "${{ matrix.python-version }}" | ||
INVOKE_NAUTOBOT_DEV_EXAMPLE_NAUTOBOT_VER: "${{ matrix.nautobot-version }}" | ||
steps: | ||
- name: "Check out repository code" | ||
uses: "actions/checkout@v4" | ||
- name: "Setup environment" | ||
uses: "networktocode/gh-action-setup-poetry-environment@v6" | ||
- name: "Set up Docker Buildx" | ||
id: "buildx" | ||
uses: "docker/setup-buildx-action@v3" | ||
- name: "Build" | ||
uses: "docker/build-push-action@v5" | ||
with: | ||
builder: "${{ steps.buildx.outputs.name }}" | ||
context: "./" | ||
push: false | ||
load: true | ||
tags: "${{ env.APP_NAME }}/nautobot:${{ matrix.nautobot-version }}-py${{ matrix.python-version }}" | ||
file: "./development/Dockerfile" | ||
cache-from: "type=gha,scope=${{ matrix.nautobot-version }}-py${{ matrix.python-version }}" | ||
cache-to: "type=gha,scope=${{ matrix.nautobot-version }}-py${{ matrix.python-version }}" | ||
build-args: | | ||
NAUTOBOT_VER=${{ matrix.nautobot-version }} | ||
PYTHON_VER=${{ matrix.python-version }} | ||
- name: "Copy credentials" | ||
run: "cp development/creds.example.env development/creds.env" | ||
- name: "Linting: pylint" | ||
run: "poetry run invoke pylint --ref=develop" |
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 @@ | ||
Run latest pylint-nautobot checks workflow. |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we have to
pip install
it here?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For our implementation, similar to
pylint-django
, it's necessary to have the package installed.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What I don't understand is why is this not installed by poetry?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
poetry install
doesn't allow to specify the GitHub as a package source, works with localpyproject.toml
only.