diff --git a/.ansible-lint b/.ansible-lint new file mode 100644 index 00000000000..a3d90f6d7ee --- /dev/null +++ b/.ansible-lint @@ -0,0 +1,7 @@ +--- +profile: production + +exclude_paths: + - changelogs/changelog.yaml + - tests/ + - .github/ diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index 0bbf1025dc3..d5f097f4f29 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -1,11 +1,14 @@ --- -name: changelog and linters +name: Linters -on: [workflow_call] # allow this workflow to be called from other workflows +on: [workflow_call] jobs: linters: - uses: ansible-network/github_actions/.github/workflows/tox.yml@main - with: - envname: "" - labelname: lint + uses: ansible-network/github_actions/.github/workflows/tox-linters.yml@main + ansible-lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Run ansible-lint + uses: ansible/ansible-lint@v6.22.1 diff --git a/.github/workflows/sanity.yml b/.github/workflows/sanity.yml deleted file mode 100644 index d3d4e312089..00000000000 --- a/.github/workflows/sanity.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -name: sanity tests - -on: [workflow_call] # allow this workflow to be called from other workflows - -jobs: - sanity: - uses: ansible-network/github_actions/.github/workflows/sanity.yml@main diff --git a/.github/workflows/all_green_check.yml b/.github/workflows/tests.yml similarity index 51% rename from .github/workflows/all_green_check.yml rename to .github/workflows/tests.yml index 9f2a8347d61..8f628a7f692 100644 --- a/.github/workflows/all_green_check.yml +++ b/.github/workflows/tests.yml @@ -1,40 +1,40 @@ ---- -name: all_green - +name: CI concurrency: - group: ${{ github.head_ref }} + group: ${{ github.head_ref || github.run_id }} cancel-in-progress: true on: # yamllint disable-line rule:truthy pull_request: - types: - - opened - - reopened - - synchronize branches: - main - stable-* - tags: - - "*" + workflow_dispatch: jobs: linters: uses: ./.github/workflows/linters.yml # use the callable linters job to run tests + changelog: + uses: ansible/ansible-content-actions/.github/workflows/changelog.yaml@main + if: github.event_name == 'pull_request' sanity: - uses: ./.github/workflows/sanity.yml # use the callable sanity job to run tests + uses: ansible/ansible-content-actions/.github/workflows/sanity.yaml@main units: - uses: ./.github/workflows/units.yml # use the callable units job to run tests + uses: ansible-network/github_actions/.github/workflows/unit_source.yml@main + all_green: if: ${{ always() }} needs: - linters + - changelog - sanity - units runs-on: ubuntu-latest steps: - run: >- - python -c "assert set([ + python -c "assert 'failure' not in + set([ '${{ needs.linters.result }}', + '${{ needs.changelog.result }}', '${{ needs.sanity.result }}', '${{ needs.units.result }}' - ]) == {'success'}" + ])" diff --git a/.github/workflows/units.yml b/.github/workflows/units.yml deleted file mode 100644 index 4d8de6bb101..00000000000 --- a/.github/workflows/units.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -name: unit tests - -on: [workflow_call] # allow this workflow to be called from other workflows - -jobs: - unit-source: - uses: ansible-network/github_actions/.github/workflows/unit_source.yml@main diff --git a/meta/runtime.yml b/meta/runtime.yml index 94614615f1e..f2b31fdc845 100644 --- a/meta/runtime.yml +++ b/meta/runtime.yml @@ -162,10 +162,10 @@ plugin_routing: rds_param_group: redirect: amazon.aws.rds_instance_param_group deprecation: - removal_version: 10.0.0 - warning_text: >- - rds_param_group has been renamed to rds_instance_param_group. - Please update your tasks. + removal_version: 10.0.0 + warning_text: >- + rds_param_group has been renamed to rds_instance_param_group. + Please update your tasks. lookup: aws_ssm: # Deprecation for this alias should not *start* prior to 2024-09-01 diff --git a/tests/sanity/ignore-2.15.txt b/tests/sanity/ignore-2.15.txt index 78c6a8f6792..3a8b527736f 100644 --- a/tests/sanity/ignore-2.15.txt +++ b/tests/sanity/ignore-2.15.txt @@ -2,3 +2,4 @@ plugins/inventory/aws_ec2.py yamllint:unparsable-with-libyaml # bug in ansible-t plugins/modules/route53.py validate-modules:parameter-state-invalid-choice # route53_info needs improvements before we can deprecate this plugins/inventory/aws_ec2.py pylint:collection-deprecated-version plugins/modules/iam_policy.py pylint:collection-deprecated-version +tests/integration/targets/inventory_aws_ec2/playbooks/tasks/ symlinks diff --git a/tests/sanity/ignore-2.16.txt b/tests/sanity/ignore-2.16.txt index 78c6a8f6792..3a8b527736f 100644 --- a/tests/sanity/ignore-2.16.txt +++ b/tests/sanity/ignore-2.16.txt @@ -2,3 +2,4 @@ plugins/inventory/aws_ec2.py yamllint:unparsable-with-libyaml # bug in ansible-t plugins/modules/route53.py validate-modules:parameter-state-invalid-choice # route53_info needs improvements before we can deprecate this plugins/inventory/aws_ec2.py pylint:collection-deprecated-version plugins/modules/iam_policy.py pylint:collection-deprecated-version +tests/integration/targets/inventory_aws_ec2/playbooks/tasks/ symlinks diff --git a/tests/sanity/ignore-2.17.txt b/tests/sanity/ignore-2.17.txt index ff6c70c3d42..d38577ccbfd 100644 --- a/tests/sanity/ignore-2.17.txt +++ b/tests/sanity/ignore-2.17.txt @@ -1,3 +1,4 @@ plugins/modules/route53.py validate-modules:parameter-state-invalid-choice # route53_info needs improvements before we can deprecate this plugins/inventory/aws_ec2.py pylint:collection-deprecated-version plugins/modules/iam_policy.py pylint:collection-deprecated-version +tests/integration/targets/inventory_aws_ec2/playbooks/tasks/ symlinks diff --git a/tests/sanity/ignore-2.18.txt b/tests/sanity/ignore-2.18.txt index ff6c70c3d42..d38577ccbfd 100644 --- a/tests/sanity/ignore-2.18.txt +++ b/tests/sanity/ignore-2.18.txt @@ -1,3 +1,4 @@ plugins/modules/route53.py validate-modules:parameter-state-invalid-choice # route53_info needs improvements before we can deprecate this plugins/inventory/aws_ec2.py pylint:collection-deprecated-version plugins/modules/iam_policy.py pylint:collection-deprecated-version +tests/integration/targets/inventory_aws_ec2/playbooks/tasks/ symlinks diff --git a/tox-ansible.ini b/tox-ansible.ini new file mode 100644 index 00000000000..f4ee11769e6 --- /dev/null +++ b/tox-ansible.ini @@ -0,0 +1,14 @@ +[ansible] + +skip = + py3.7 + py3.8 + 2.9 + 2.10 + 2.11 + 2.12 + 2.13 + 2.14 + +[testenv:sanity-{py3.10,py3.11,py3.12}-devel] +ignore_outcome = true