Skip to content

Commit

Permalink
Update lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashwini Mhatre committed Nov 30, 2023
1 parent e7aa746 commit a7c7741
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
profile: production

exclude_paths:
- changelogs/changelog.yaml
13 changes: 13 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
name: ansible-lint
on: # yamllint disable-line rule:truthy
pull_request:
branches: ["main"]
jobs:
build:
name: Ansible Lint # Naming the build is important to use it as a status check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run ansible-lint
uses: ansible/ansible-lint@main # or version tag instead of 'main'
15 changes: 6 additions & 9 deletions .github/workflows/test.yml → .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: tests
name: CI

concurrency:
group: ${{ github.head_ref || github.run_id }}
Expand All @@ -13,25 +13,22 @@ on: # yamllint disable-line rule:truthy
- cron: '0 0 * * *'

jobs:
ansible-lint:
uses: ansible-network/github_actions/.github/workflows/ansible-lint.yml@main
changelog:
uses: ansible-network/github_actions/.github/workflows/changelog.yml@main
if: github.event_name == 'pull_request'
sanity:
uses: ansible-network/github_actions/.github/workflows/sanity.yml@main


all_green:
if: ${{ always() && (github.event_name != 'schedule') }}
if: ${{ always() }}
needs:
- changelog
- sanity
- ansible-lint
runs-on: ubuntu-latest
steps:
- run: >-
python -c "assert set([
python -c "assert 'failure' not in
set([
'${{ needs.changelog.result }}',
'${{ needs.sanity.result }}',
'${{ needs.ansible-lint.result }}',
]) == {'success'}"
])"

0 comments on commit a7c7741

Please sign in to comment.