Skip to content

Commit

Permalink
Fix publish frontend workflow (#248)
Browse files Browse the repository at this point in the history
* Upgrade upload-charm action

* Trigger publish frontend on push of development branch

* Temporarily avoid building image

* Fix frontend charm linting issues

* Remove unused dependency

* Use tag-prefix to separate frontend and api tags

* Remove publish frontend workflow changes for testing

* Upgrade upload charm action for api too
  • Loading branch information
omar-selo authored Jan 21, 2025
1 parent a4770f3 commit 09d5409
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/publish_api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,9 @@ jobs:
uses: actions/checkout@v2

- name: Upload charm to charmhub
uses: canonical/charming-actions/upload-charm@2.4.0
uses: canonical/charming-actions/upload-charm@2.6.3
with:
charm-path: "backend/charm"
credentials: "${{ secrets.CHARMHUB_TOKEN }}"
github-token: "${{ secrets.GITHUB_TOKEN }}"
tag-prefix: "api"
3 changes: 2 additions & 1 deletion .github/workflows/publish_frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,9 @@ jobs:
- name: Checkout
uses: actions/checkout@v2
- name: Upload charm to charmhub
uses: canonical/charming-actions/upload-charm@2.4.0
uses: canonical/charming-actions/upload-charm@2.6.3
with:
charm-path: "frontend/charm"
credentials: "${{ secrets.CHARMHUB_TOKEN }}"
github-token: "${{ secrets.GITHUB_TOKEN }}"
tag-prefix: "frontend"
3 changes: 1 addition & 2 deletions frontend/charm/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
ops >= 2.8.0
macaroonbakery==1.3.2 # workaround to failures such as https://github.com/canonical/test_observer/actions/runs/7142353669/job/19451476954
ops >= 2.8.0
1 change: 1 addition & 0 deletions frontend/charm/tests/unit/test_charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

import ops
import ops.testing

from charm import TestObserverFrontendCharm


Expand Down
4 changes: 2 additions & 2 deletions frontend/charm/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ deps =
ruff
commands =
black {[vars]all_path}
ruff --fix {[vars]all_path}
ruff check {[vars]all_path}

[testenv:lint]
description = Check code against coding style standards
Expand All @@ -43,7 +43,7 @@ commands =
# and uncomment the following line
# codespell {[vars]lib_path}
codespell {tox_root}
ruff {[vars]all_path}
ruff check {[vars]all_path}
black --check --diff {[vars]all_path}

[testenv:unit]
Expand Down

0 comments on commit 09d5409

Please sign in to comment.