Skip to content

Fix CI issues and update workflows for jobs : lint, sanity , unit runs #208

Fix CI issues and update workflows for jobs : lint, sanity , unit runs

Fix CI issues and update workflows for jobs : lint, sanity , unit runs #208

Workflow file for this run

---
name: "Collection Tests 🧪"
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
on: # yamllint disable-line rule:truthy
pull_request:
branches: [master]
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
jobs:
changelog:
uses: ansible/ansible-content-actions/.github/workflows/changelog.yaml@main
if: github.event_name == 'pull_request'
build-import:
name: build-import-collection
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Ensure ansible-core and galaxy-importer is installed
shell: bash
run: |
python -m pip install ansible-core galaxy-importer
- name: Update galaxy-importer cfg
shell: bash
run: |
echo "[galaxy-importer]\nCHECK_REQUIRED_TAGS=True" > /tmp/galaxy-importer.cfg
export GALAXY_IMPORTER_CONFIG=/tmp/galaxy-importer.cfg
- name: Build the collection tarball and run galaxy importer on it
shell: bash
working-directory: ansible_collections/juniper/device
run: |
python -m galaxy_importer.main --git-clone-path . --output-path /tmp
ansible-lint:
uses: ansible/ansible-content-actions/.github/workflows/ansible_lint.yaml@main
with:
working_directory: ansible_collections/juniper/device
sanity:
uses: ansible/ansible-content-actions/.github/workflows/sanity.yaml@main
unit-galaxy:
uses: ansible/ansible-content-actions/.github/workflows/unit.yaml@main
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() && (github.event_name != 'schedule') }}
needs:
- changelog
- build-import
- sanity
- unit-galaxy
- ansible-lint
- unit-source
runs-on: ubuntu-latest
steps:
- run: >-
python -c "assert 'failure' not in
set([
'${{ needs.changelog.result }}',
'${{ needs.build-import.result }}',
'${{ needs.sanity.result }}',
'${{ needs.unit-galaxy.result }}',
'${{ needs.ansible-lint.result }}',
'${{ needs.unit-source.result }}'
])"