Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions .github/workflows/update_deps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Update Dependencies

on:
schedule:
# Every Monday at 1 AM
- cron: '0 1 * * 1'

jobs:
Update_Deps:

runs-on: ubuntu-latest
name: ${{ matrix.name || matrix.args }}

strategy:
fail-fast: false
matrix:
args: [docs, flake8, mypy, pylint]

# Uncomment to enable base dependency checking
# include:

# - args: '-b'
# name: Base Dependencies

env:
DEPS_UPDATED: false
GH_TOKEN: ${{ github.token }}
PR_BRANCH: bumpdeps/${{ join(matrix.args, '_') }}_${{ github.run_id }}
PR_MSG: "BumpDeps: ${{ matrix.name || matrix.args }}"

steps:
- uses: actions/checkout@v3

- name: Install latest Python
uses: actions/setup-python@v4
with:
python-version: 3.x

- name: Install bumpdeps
run: pip install bumpdeps

- name: Setup Git
run: |
set -x
git config --global user.name "BumpDeps"
git config --global user.email "<>"
git checkout -b $PR_BRANCH

- name: Update deps
run: |
set -x
bumpdeps ${{ matrix.args }}
git diff --quiet || echo "DEPS_UPDATED=true" >> $GITHUB_ENV

- name: Create PR
run: |
set -x
git commit -a -m "$PR_MSG"
git --no-pager log -n 2
git push -u origin $PR_BRANCH
gh pr create -B main -H $PR_BRANCH --title "$PR_MSG" --body "Created by Github Action"
if: env.DEPS_UPDATED == 'true'
8 changes: 4 additions & 4 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ def pylint(session: nox.Session) -> None:
*OPTIONAL_DEPENDENCIES["aws"],
*OPTIONAL_DEPENDENCIES["azure"],
*OPTIONAL_DEPENDENCIES["libvirt"],
*OPTIONAL_DEPENDENCIES["pylint"],
*OPTIONAL_DEPENDENCIES["typing"],
"pylint",
)
session.run(
"pylint",
Expand All @@ -124,9 +124,9 @@ def mypy(session: nox.Session) -> None:
session.install(
*DEPENDENCIES,
*OPTIONAL_DEPENDENCIES["azure"],
*OPTIONAL_DEPENDENCIES["mypy"],
*OPTIONAL_DEPENDENCIES["typing"],
*NOX_DEPENDENCIES,
"mypy == 0.942",
)

session.run("mypy", "-p", "lisa")
Expand Down Expand Up @@ -219,11 +219,11 @@ def dev(session: nox.Session) -> None:
"-m",
"pip",
"install",
"mypy",
"black",
"isort",
"pylint",
*OPTIONAL_DEPENDENCIES["flake8"],
*OPTIONAL_DEPENDENCIES["mypy"],
*OPTIONAL_DEPENDENCIES["pylint"],
*OPTIONAL_DEPENDENCIES["typing"],
*NOX_DEPENDENCIES,
external=True,
Expand Down
8 changes: 8 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,14 @@ libvirt = [
"pycdlib ~= 1.12.0; platform_system != 'Windows'",
]

mypy = [
"mypy == 0.942",
]

pylint = [
"pylint ~= 2.15.10"
]

test = [
]

Expand Down