Skip to content

Commit

Permalink
Fix the linting issues (#77) (#144)
Browse files Browse the repository at this point in the history
Fix the linting issue reported during Redhat upload

---------

Co-authored-by: [email protected]
  • Loading branch information
AnilVijayan authored Dec 26, 2024
1 parent ec6d32c commit ba642e9
Show file tree
Hide file tree
Showing 28 changed files with 609 additions and 330 deletions.
74 changes: 37 additions & 37 deletions .github/workflows/doc-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,27 +21,27 @@ jobs:

name: generate documenation source files
steps:
- name: checkout repository
uses: actions/checkout@v4
- name: setup python
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
- name: install document generation requirements
run: |
python -m pip install --upgrade pip
python -m pip install ansible
python -m pip install ansible-doc-extractor
python -m pip install sphinx
python -m pip install sphinx_rtd_theme
python -m pip install --upgrade myst-parser
- name: run document generator script
run: |
bash devops/bin/gen_doc.sh
- uses: actions/upload-artifact@v3
with:
name: hmc-doc-artifact
path: ./docs/build
- name: checkout repository
uses: actions/checkout@v4
- name: setup python
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
- name: install document generation requirements
run: |
python -m pip install --upgrade pip
python -m pip install ansible
python -m pip install ansible-doc-extractor
python -m pip install sphinx
python -m pip install sphinx_rtd_theme
python -m pip install --upgrade myst-parser
- name: run document generator script
run: |
bash devops/bin/gen_doc.sh
- uses: actions/upload-artifact@v3
with:
name: hmc-doc-artifact
path: ./docs/build

deploy-doc:
runs-on: ubuntu-22.04
Expand All @@ -54,19 +54,19 @@ jobs:
pages: write

steps:
- uses: actions/download-artifact@v3
with:
name: hmc-doc-artifact
path: .
- uses: actions/configure-pages@v4
with:
#User need to set this secret on github actions
token: ${{ secrets.TOKEN_PAM }}
enablement: true
- uses: actions/upload-pages-artifact@v1
with:
path: .
- id: deployment
uses: actions/deploy-pages@v3
with:
token: ${{ secrets.TOKEN_PAM }}
- uses: actions/download-artifact@v3
with:
name: hmc-doc-artifact
path: .
- uses: actions/configure-pages@v4
with:
# User need to set this secret on github actions
token: ${{ secrets.TOKEN_PAM }}
enablement: true
- uses: actions/upload-pages-artifact@v1
with:
path: .
- id: deployment
uses: actions/deploy-pages@v3
with:
token: ${{ secrets.TOKEN_PAM }}
52 changes: 26 additions & 26 deletions .github/workflows/linting.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches:
- '*'
pull_request:
branches: [ dev-collection ]
branches: [dev-collection]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand All @@ -21,28 +21,28 @@ jobs:

name: run module linting
steps:
- name: checkout repository
uses: actions/checkout@v4

- name: setup python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: install linting test requirements
run: |
python -m pip install --upgrade pip
make install-ansible
make install-sanity-test-requirements
make install-ansible-lint
- name: build and install new content as collection
run: |
make prep-collection
- name: run linter
run: make module-lint
working-directory: /home/runner/.ansible/collections/ansible_collections/ibm/power_hmc

- name: run install-ansible
run: make ansible-lint
- name: checkout repository
uses: actions/checkout@v4

- name: setup python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: install linting test requirements
run: |
python -m pip install --upgrade pip
make install-ansible
make install-sanity-test-requirements
make install-ansible-lint
- name: build and install new content as collection
run: |
make prep-collection
- name: run linter
run: make module-lint
working-directory: /home/runner/.ansible/collections/ansible_collections/ibm/power_hmc

- name: run install-ansible
run: make ansible-lint
40 changes: 20 additions & 20 deletions .github/workflows/unit-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches:
- '*'
pull_request:
branches: [ dev-collection ]
branches: [dev-collection]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand All @@ -21,22 +21,22 @@ jobs:

name: running unit tests with python ${{ matrix.python-version }}
steps:
- name: checkout repository
uses: actions/checkout@v4

- name: setup python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: install ansible ${{ matrix.ansible-version }}
run: |
make install-ansible
- name: install python modules needed for unit testing
run: |
make install-unit-test-requirements
- name: run unit tests
run: |
make unit-test PYTHON_VERSION=${{ matrix.python-version }}
- name: checkout repository
uses: actions/checkout@v4

- name: setup python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: install ansible ${{ matrix.ansible-version }}
run: |
make install-ansible
- name: install python modules needed for unit testing
run: |
make install-unit-test-requirements
- name: run unit tests
run: |
make unit-test PYTHON_VERSION=${{ matrix.python-version }}
Loading

0 comments on commit ba642e9

Please sign in to comment.