Skip to content
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

DNM: content-actions refactor #843

Draft
wants to merge 20 commits into
base: main
Choose a base branch
from
11 changes: 0 additions & 11 deletions .github/workflows/check_label.yml

This file was deleted.

16 changes: 0 additions & 16 deletions .github/workflows/codecoverage.yml

This file was deleted.

18 changes: 0 additions & 18 deletions .github/workflows/draft_release.yml

This file was deleted.

14 changes: 0 additions & 14 deletions .github/workflows/release.yml

This file was deleted.

85 changes: 70 additions & 15 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,40 +13,95 @@ on: # yamllint disable-line rule:truthy
- cron: '0 0 * * *'

jobs:
changelog:
uses: ansible/ansible-content-actions/.github/workflows/changelog.yaml@main
if: github.event_name == 'pull_request'
build-import:
uses: ansible/ansible-content-actions/.github/workflows/build_import.yaml@main
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- uses: NilashishC/ansible-content-actions/.github/actions/build-import@actions_refactor

build-tox-matrix:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- uses: NilashishC/ansible-content-actions/.github/actions/generate-tox-ansible-matrix@actions_refactor # yamllint disable-line rule:line-length
id: build-matrix-unit
with:
scope: unit

- uses: NilashishC/ansible-content-actions/.github/actions/generate-tox-ansible-matrix@actions_refactor # yamllint disable-line rule:line-length
id: build-matrix-sanity
with:
scope: sanity
outputs:
unit-envlist: "${{ steps.build-matrix-unit.outputs.envlist }}"
sanity-envlist: "${{ steps.build-matrix-sanity.outputs.envlist }}"

run-unit-galaxy:
needs: build-tox-matrix
strategy:
fail-fast: false
matrix:
entry: "${{ fromJson(needs.build-tox-matrix.outputs.unit-envlist) }}"
name: "${{ matrix.entry.name }}"
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- uses: NilashishC/ansible-content-actions/.github/actions/run-unit-galaxy@actions_refactor # yamllint disable-line rule:line-length
with:
test-env: "${{ matrix.entry.name }}"
run-sanity:
needs: build-tox-matrix
strategy:
fail-fast: false
matrix:
entry: "${{ fromJson(needs.build-tox-matrix.outputs.sanity-envlist) }}"
name: "${{ matrix.entry.name }}"
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- uses: NilashishC/ansible-content-actions/.github/actions/run-sanity@actions_refactor # yamllint disable-line rule:line-length
with:
test-env: "${{ matrix.entry.name }}"

ansible-lint:
uses: ansible/ansible-content-actions/.github/workflows/ansible_lint.yaml@main
sanity:
uses: ansible/ansible-content-actions/.github/workflows/sanity.yaml@main
unit-galaxy:
uses: ansible/ansible-content-actions/.github/workflows/unit.yaml@main
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- uses: NilashishC/ansible-content-actions/.github/actions/run-ansible-lint@actions_refactor # yamllint disable-line rule:line-length

unit-source:
uses: ansible-network/github_actions/.github/workflows/unit_source.yml@main
with:
collection_pre_install: >-
git+https://github.com/ansible-collections/ansible.utils.git
git+https://github.com/ansible-collections/ansible.netcommon.git

all_green:
if: ${{ always() }}
needs:
- changelog
- build-import
- sanity
- unit-galaxy
- run-sanity
- run-unit-galaxy
- unit-source
- ansible-lint
runs-on: ubuntu-latest
steps:
- run: >-
python -c "assert 'failure' not in
set([
'${{ needs.changelog.result }}',
'${{ needs.sanity.result }}',
'${{ needs.unit-galaxy.result }}'
'${{ needs.build-import.result }}',
'${{ needs.run-sanity.result }}',
'${{ needs.run-unit-galaxy.result }}'
'${{ needs.ansible-lint.result }}'
'${{ needs.unit-source.result }}'
])"
Loading