From f9a43a7d4ea3b590db49800cd4b982a4a6dfbaa5 Mon Sep 17 00:00:00 2001 From: NilashishC Date: Mon, 28 Apr 2025 16:11:11 +0530 Subject: [PATCH 1/4] Add build-import and DVCS check workflows Signed-off-by: NilashishC --- .github/workflows/collection.yml | 4 ++++ .github/workflows/dvcs_check.yml | 15 +++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 .github/workflows/dvcs_check.yml diff --git a/.github/workflows/collection.yml b/.github/workflows/collection.yml index 22a9d407..9f5dc202 100644 --- a/.github/workflows/collection.yml +++ b/.github/workflows/collection.yml @@ -217,4 +217,8 @@ jobs: - name: Get ansible-lint version run: ansible-lint --version if: failure() + + build-import: + name: Build collection and run galaxy importer check + uses: ansible/ansible-content-actions/.github/workflows/build_import.yaml@main ... diff --git a/.github/workflows/dvcs_check.yml b/.github/workflows/dvcs_check.yml new file mode 100644 index 00000000..15b54a41 --- /dev/null +++ b/.github/workflows/dvcs_check.yml @@ -0,0 +1,15 @@ +--- +name: DVCS (Find Jira Key) +on: + pull_request_target: +jobs: + dvcs_pr_checker: + permissions: + contents: read + pull-requests: write + runs-on: ubuntu-latest + name: Check the PR for DVCS integration + steps: + - uses: ansible/dvcs-action@devel + with: + github_token: ${{ secrets.GITHUB_TOKEN }} From e15250e44501ac9b9ba39806213e390e88db2597 Mon Sep 17 00:00:00 2001 From: NilashishC Date: Mon, 28 Apr 2025 16:20:17 +0530 Subject: [PATCH 2/4] Fix lint Signed-off-by: NilashishC --- .github/workflows/dvcs_check.yml | 1 + Makefile | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dvcs_check.yml b/.github/workflows/dvcs_check.yml index 15b54a41..7c8feffa 100644 --- a/.github/workflows/dvcs_check.yml +++ b/.github/workflows/dvcs_check.yml @@ -13,3 +13,4 @@ jobs: - uses: ansible/dvcs-action@devel with: github_token: ${{ secrets.GITHUB_TOKEN }} +... diff --git a/Makefile b/Makefile index ea6f767d..dcf7775a 100644 --- a/Makefile +++ b/Makefile @@ -65,7 +65,7 @@ collection-docs: collection-install ## Run the collection lint check collection-lint: collection-install - # ansible-lint gets its settings from ansible_platform_collection/.ansible-lint + # ansible-lint gets its settings from .ansible-lint ansible-lint --profile=production ## Run the collection tests From 38816285a864ee7f8a8a1738cd34924babdf5b55 Mon Sep 17 00:00:00 2001 From: NilashishC Date: Mon, 28 Apr 2025 16:28:07 +0530 Subject: [PATCH 3/4] remove redundant dependencies Signed-off-by: NilashishC --- .github/workflows/linting.yml | 6 +++--- requirements/requirements_dev.txt | 15 --------------- 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 289a8739..647922dc 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -16,11 +16,11 @@ jobs: fail-fast: false matrix: tests: - - name: api-flake8 + - name: flake8 command: check_flake8 - - name: api-black + - name: black command: check_black - - name: api-isort + - name: isort command: check_isort steps: - name: Install make diff --git a/requirements/requirements_dev.txt b/requirements/requirements_dev.txt index f9a5f2c2..1ce5ef42 100644 --- a/requirements/requirements_dev.txt +++ b/requirements/requirements_dev.txt @@ -1,20 +1,5 @@ -ansible # Needed by the dev environment to run playbooks black==25.1.0 # Linting tool, if changed update pyproject.toml as well -build -debugpy # Used for VSCode debugging -django-debug-toolbar flake8==7.1.1 # Linting tool, if changed update pyproject.toml as well Flake8-pyproject==1.2.3 # Linting tool, if changed update pyproject.toml as well -ipython # Used in shell_plus isort==6.0.0 # Linting tool, if changed update pyproject.toml as well -remote-pdb # The debugger setup with Python's breakpoint() tox # Used for unit tests -tox-docker # For running postgres during tests -colorama # Allows addition of color to logs -logutils -psycopg[binary] -requests -setuptools>=70.0.0 # Needed for the plumbing of the side cars, pinned for https://github.com/ansible/aap-gateway/security/dependabot/25 -setuptools_scm # Needed for proper version string on /api/gateway/v1/ping -docker # Needed for the plumbing of the side cars via Ansible -PyYAML # Collection tests From e5288749e0f9721722ddfa440cfe649f5b4e1191 Mon Sep 17 00:00:00 2001 From: NilashishC Date: Mon, 28 Apr 2025 16:46:41 +0530 Subject: [PATCH 4/4] Change to pull_request_target Signed-off-by: NilashishC --- .github/workflows/collection.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/collection.yml b/.github/workflows/collection.yml index 9f5dc202..e3cb6cba 100644 --- a/.github/workflows/collection.yml +++ b/.github/workflows/collection.yml @@ -2,7 +2,7 @@ name: platform collection tests on: push: - pull_request: + pull_request_target: jobs: integration: