-
Notifications
You must be signed in to change notification settings - Fork 341
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use configure_ci tool to scaffold gh workflows #2094
Open
GomathiselviS
wants to merge
6
commits into
ansible-collections:main
Choose a base branch
from
GomathiselviS:gh_fix_0515_134917
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
b4ea609
Use configure_ci tool to scaffold gh workflows
GomathiselviS d08fe25
Fix linters.yml
GomathiselviS 6cd9141
Fix linters.yml
GomathiselviS 6ab16b3
ignore symlinks failure
GomathiselviS 5d4f2f2
ignore tests for ansible-lint
GomathiselviS c2e7429
Fix yamllint failure
GomathiselviS File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
profile: production | ||
|
||
exclude_paths: | ||
- changelogs/changelog.yaml | ||
- tests/ | ||
- .github/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/[email protected] |
This file was deleted.
Oops, something went wrong.
28 changes: 14 additions & 14 deletions
28
.github/workflows/all_green_check.yml → .github/workflows/tests.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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'}" | ||
])" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the unit workflow from ansible-content-actions not do what we need?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ansible-content-actions run the unit tests on the galaxy version of the collection. It uses tox-ansible which lacks the capabilities to do a source install.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we sure about this? When I run tox-ansible locally it looks to me like it's using my local copy. The way I read the docs for the action is that it installs the collection's dependencies from galaxy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am reaching out to the devtools team regarding this issue. It wasn't functioning earlier, and I'm not sure if there have been any alterations in tox-ansible. Currently, there isn't a workflow in ansible-content-actions to execute unit tests on the source.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're correct. Sorry for the confusion. tox-ansible pulls dependencies from Galaxy, not the source.