Skip to content

Commit

Permalink
Format Everything (via make format) and MISC Updates to GitHub Workfl…
Browse files Browse the repository at this point in the history
…ows (#466)

* Format everything (make format)

* Simplified workflow

* Downgrade to Ubuntu 20

* Add upgrade ubuntu comment
  • Loading branch information
zliang-akamai authored Feb 6, 2024
1 parent 09f8b98 commit 1565ae0
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 15 deletions.
17 changes: 7 additions & 10 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,23 @@ name: Run Unit test

jobs:
run-tests:
runs-on: ubuntu-latest

# TODO:
# Upgrade back to ubuntu-latest when the permission issue fixed
runs-on: ubuntu-20.04
defaults:
run:
working-directory: .ansible/collections/ansible_collections/linode/cloud
steps:
- name: checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: .ansible/collections/ansible_collections/linode/cloud

- name: update packages
run: sudo apt-get update -y

- name: install make
run: sudo apt-get install -y build-essential

- name: setup python 3
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.10'
python-version: '3.11'

- name: install dependencies
run: make deps
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ clean:
rm -f *.tar.gz && rm -rf galaxy.yml

build: deps clean gendocs
python scripts/render_galaxy.py $(COLLECTION_VERSION) && ansible-galaxy collection build
python3 scripts/render_galaxy.py $(COLLECTION_VERSION) && ansible-galaxy collection build

publish: build
@if test "$(GALAXY_TOKEN)" = ""; then \
Expand Down Expand Up @@ -56,7 +56,7 @@ gendocs:

DOCS_PATH=$(DOCS_PATH) ./scripts/specdoc_generate.sh
ansible-doc-extractor --template=template/module.rst.j2 $(DOCS_PATH)/inventory plugins/inventory/*.py
python scripts/render_readme.py $(COLLECTION_VERSION)
python3 scripts/render_readme.py $(COLLECTION_VERSION)

# if want to add all the test add the tag --tags never at the end
# ansible-test integration $(TEST_ARGS) --tags never
Expand Down
1 change: 1 addition & 0 deletions plugins/module_utils/linode_helper.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""This module contains helper functions for various Linode modules."""

from typing import Any, Callable, Dict, List, Optional, Set, Tuple, Union, cast

import linode_api4
Expand Down
6 changes: 3 additions & 3 deletions plugins/modules/lke_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -478,9 +478,9 @@ def _populate_dashboard_url_no_poll(self, cluster: LKECluster) -> None:
def _populate_dashboard_url_poll(self, cluster: LKECluster) -> None:
def condition() -> bool:
try:
self.results[
"dashboard_url"
] = cluster.cluster_dashboard_url_view()
self.results["dashboard_url"] = (
cluster.cluster_dashboard_url_view()
)
except ApiError as error:
if error.status != 503:
raise error
Expand Down

0 comments on commit 1565ae0

Please sign in to comment.