Skip to content

Commit

Permalink
feat: use pip compile for all the parts of the CI pieline
Browse files Browse the repository at this point in the history
  • Loading branch information
misohu committed Dec 9, 2022
1 parent f52c68f commit 72ddca5
Show file tree
Hide file tree
Showing 15 changed files with 307 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/branch_automation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
jobs:
branch-track-creation:
name: Branch creation
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
env:
KUBEFLOW_BOT_TOKEN: ${{ secrets.KUBEFLOW_BOT_TOKEN }}
steps:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/on_pull_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@ on:
jobs:
lint:
name: Lint Code
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- run: sudo apt update && sudo apt install tox
- run: tox -e lint

branch_creation_tests:
name: Branch Creation Script Tests
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- run: sudo apt update && sudo apt install tox
- run: tox -e test_branch_creation

batch_release_charms_tests:
name: Batch Release Charms Script Tests
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- run: sudo apt update && sudo apt install tox
Expand Down
6 changes: 3 additions & 3 deletions cannon_runs/2021-12-06_publish_workflow_bundles/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
jobs:
get-charm-matrix:
name: Generate the Charm Matrix
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
outputs:
charm_paths_json: ${{ steps.get-charm-matrix-step.outputs.CHARM_PATHS_JSON }}
steps:
Expand All @@ -26,7 +26,7 @@ jobs:

publish-charm:
name: Publish Charm
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
# Only publish to charmhub if we are pushing to a special branch or running PRs from something named `branch/*`
if: (github.event_name == 'push') || (startsWith( github.head_ref, 'branch/' ))
needs: get-charm-matrix
Expand All @@ -44,7 +44,7 @@ jobs:
publish-bundle:
# TODO: This publishes always, even if nothing changed. Decouple bundle publishing from charm publishing in future?
name: Publish Bundle
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
env:
CHARMCRAFT_AUTH: ${{ secrets.CHARMCRAFT_CREDENTIALS }}
steps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
jobs:
publish-charm:
name: Publish Charm
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
# Only publish to charmhub if we are pushing to a special branch or running PRs from something named `branch/*`
if: (github.event_name == 'push') || (startsWith( github.head_ref, 'branch/' ))
steps:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ exclude = [".git", "__pycache__", ".tox", "build", "dist", "*.egg_info", "venv",
select = ["E", "W", "F", "C", "N", "R", "D", "H"]
# Ignore W503, E501 because using black creates errors with this
# Ignore D107 Missing docstring in __init__
ignore = ["W503", "E501", "D107", "D415"]
ignore = ["W503", "E501", "D107", "D415", "C801", "F541", "N812", ""]
# D100, D101, D102, D103: Ignore missing docstrings in tests
per-file-ignores = ["tests/*:D100,D101,D102,D103,D104"]
docstring-convention = "google"
Expand Down
2 changes: 1 addition & 1 deletion requirements-fmt.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ mypy-extensions==0.4.3
# via black
pathspec==0.10.2
# via black
platformdirs==2.5.4
platformdirs==2.6.0
# via black
tomli==2.0.1
# via black
Expand Down
2 changes: 1 addition & 1 deletion requirements-lint.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pathspec==0.10.2
# black
pep8-naming==0.13.2
# via -r ./requirements-lint.in
platformdirs==2.5.4
platformdirs==2.6.0
# via
# -r ./requirements-fmt.txt
# black
Expand Down
3 changes: 3 additions & 0 deletions requirements-test_batch_release_charms.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pytest
pytest-mock
-r ./scripts/release-charms/requirements.txt
149 changes: 149 additions & 0 deletions requirements-test_batch_release_charms.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
#
# This file is autogenerated by pip-compile with Python 3.8
# by the following command:
#
# pip-compile --resolver=backtracking ./requirements-test_batch_release_charms.in
#
anyio==3.6.2
# via
# -r ././scripts/release-charms/requirements.txt
# httpcore
attrs==22.1.0
# via pytest
certifi==2022.12.7
# via
# -r ././scripts/release-charms/requirements.txt
# httpcore
# httpx
# requests
cffi==1.15.1
# via
# -r ././scripts/release-charms/requirements.txt
# pynacl
charmed-kubeflow-chisme==0.0.5
# via -r ././scripts/release-charms/requirements.txt
charset-normalizer==2.1.1
# via
# -r ././scripts/release-charms/requirements.txt
# requests
click==8.1.3
# via
# -r ././scripts/release-charms/requirements.txt
# typer
deepdiff==6.2.1
# via
# -r ././scripts/release-charms/requirements.txt
# charmed-kubeflow-chisme
deprecated==1.2.13
# via
# -r ././scripts/release-charms/requirements.txt
# pygithub
exceptiongroup==1.0.4
# via pytest
h11==0.14.0
# via
# -r ././scripts/release-charms/requirements.txt
# httpcore
httpcore==0.16.2
# via
# -r ././scripts/release-charms/requirements.txt
# httpx
httpx==0.23.1
# via
# -r ././scripts/release-charms/requirements.txt
# lightkube
idna==3.4
# via
# -r ././scripts/release-charms/requirements.txt
# anyio
# requests
# rfc3986
iniconfig==1.1.1
# via pytest
jinja2==3.1.2
# via
# -r ././scripts/release-charms/requirements.txt
# charmed-kubeflow-chisme
lightkube==0.11.0
# via
# -r ././scripts/release-charms/requirements.txt
# charmed-kubeflow-chisme
lightkube-models==1.25.4.4
# via
# -r ././scripts/release-charms/requirements.txt
# lightkube
markupsafe==2.1.1
# via
# -r ././scripts/release-charms/requirements.txt
# jinja2
ops==1.5.4
# via
# -r ././scripts/release-charms/requirements.txt
# charmed-kubeflow-chisme
ordered-set==4.1.0
# via
# -r ././scripts/release-charms/requirements.txt
# deepdiff
packaging==22.0
# via pytest
pluggy==1.0.0
# via pytest
pycparser==2.21
# via
# -r ././scripts/release-charms/requirements.txt
# cffi
pygithub==1.57
# via -r ././scripts/release-charms/requirements.txt
pyjwt==2.6.0
# via
# -r ././scripts/release-charms/requirements.txt
# pygithub
pynacl==1.5.0
# via
# -r ././scripts/release-charms/requirements.txt
# pygithub
pytest==7.2.0
# via
# -r ./requirements-test_batch_release_charms.in
# pytest-mock
pytest-mock==3.10.0
# via -r ./requirements-test_batch_release_charms.in
pyyaml==6.0
# via
# -r ././scripts/release-charms/requirements.txt
# lightkube
# ops
requests==2.28.1
# via
# -r ././scripts/release-charms/requirements.txt
# pygithub
rfc3986[idna2008]==1.5.0
# via
# -r ././scripts/release-charms/requirements.txt
# httpx
ruamel-yaml==0.17.21
# via
# -r ././scripts/release-charms/requirements.txt
# charmed-kubeflow-chisme
ruamel-yaml-clib==0.2.7
# via
# -r ././scripts/release-charms/requirements.txt
# ruamel-yaml
sniffio==1.3.0
# via
# -r ././scripts/release-charms/requirements.txt
# anyio
# httpcore
# httpx
tomli==2.0.1
# via pytest
typer==0.7.0
# via -r ././scripts/release-charms/requirements.txt
urllib3==1.26.13
# via
# -r ././scripts/release-charms/requirements.txt
# requests
wrapt==1.14.1
# via
# -r ././scripts/release-charms/requirements.txt
# deprecated
6 changes: 6 additions & 0 deletions requirements-test_branch_creation copy.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pyyaml
requests
GitPython
pytest
requests-mock
pytest-mock
48 changes: 48 additions & 0 deletions requirements-test_branch_creation copy.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#
# This file is autogenerated by pip-compile with Python 3.8
# by the following command:
#
# pip-compile --resolver=backtracking './requirements-test_branch_creation copy.in'
#
attrs==22.1.0
# via pytest
certifi==2022.12.7
# via requests
charset-normalizer==2.1.1
# via requests
exceptiongroup==1.0.4
# via pytest
gitdb==4.0.10
# via gitpython
gitpython==3.1.29
# via -r ./requirements-test_branch_creation copy.in
idna==3.4
# via requests
iniconfig==1.1.1
# via pytest
packaging==22.0
# via pytest
pluggy==1.0.0
# via pytest
pytest==7.2.0
# via
# -r ./requirements-test_branch_creation copy.in
# pytest-mock
pytest-mock==3.10.0
# via -r ./requirements-test_branch_creation copy.in
pyyaml==6.0
# via -r ./requirements-test_branch_creation copy.in
requests==2.28.1
# via
# -r ./requirements-test_branch_creation copy.in
# requests-mock
requests-mock==1.10.0
# via -r ./requirements-test_branch_creation copy.in
six==1.16.0
# via requests-mock
smmap==5.0.0
# via gitdb
tomli==2.0.1
# via pytest
urllib3==1.26.13
# via requests
3 changes: 3 additions & 0 deletions scripts/release-charms/requirements.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
charmed-kubeflow-chisme
PyGithub
typer
82 changes: 79 additions & 3 deletions scripts/release-charms/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,79 @@
charmed-kubeflow-chisme
PyGithub
typer
#
# This file is autogenerated by pip-compile with Python 3.8
# by the following command:
#
# pip-compile --resolver=backtracking ./scripts/release-charms/requirements.in
#
anyio==3.6.2
# via httpcore
certifi==2022.12.7
# via
# httpcore
# httpx
# requests
cffi==1.15.1
# via pynacl
charmed-kubeflow-chisme==0.0.5
# via -r ./scripts/release-charms/requirements.in
charset-normalizer==2.1.1
# via requests
click==8.1.3
# via typer
deepdiff==6.2.1
# via charmed-kubeflow-chisme
deprecated==1.2.13
# via pygithub
h11==0.14.0
# via httpcore
httpcore==0.16.2
# via httpx
httpx==0.23.1
# via lightkube
idna==3.4
# via
# anyio
# requests
# rfc3986
jinja2==3.1.2
# via charmed-kubeflow-chisme
lightkube==0.11.0
# via charmed-kubeflow-chisme
lightkube-models==1.25.4.4
# via lightkube
markupsafe==2.1.1
# via jinja2
ops==1.5.4
# via charmed-kubeflow-chisme
ordered-set==4.1.0
# via deepdiff
pycparser==2.21
# via cffi
pygithub==1.57
# via -r ./scripts/release-charms/requirements.in
pyjwt==2.6.0
# via pygithub
pynacl==1.5.0
# via pygithub
pyyaml==6.0
# via
# lightkube
# ops
requests==2.28.1
# via pygithub
rfc3986[idna2008]==1.5.0
# via httpx
ruamel-yaml==0.17.21
# via charmed-kubeflow-chisme
ruamel-yaml-clib==0.2.7
# via ruamel-yaml
sniffio==1.3.0
# via
# anyio
# httpcore
# httpx
typer==0.7.0
# via -r ./scripts/release-charms/requirements.in
urllib3==1.26.13
# via requests
wrapt==1.14.1
# via deprecated
Loading

0 comments on commit 72ddca5

Please sign in to comment.