Debian Codegraph @

ansible_collections/cisco/nxos/.github/workflows/tests.yml

raw
1 ---
2 name: "Collection Tests 🧪"
3
4 concurrency:
5 group: ${{ github.head_ref || github.run_id }}-${{ github.event_name }}
6 cancel-in-progress: true
7
8 on: # yamllint disable-line rule:truthy
9 push:
10 branches: [main]
11 pull_request_target:
12 branches: [main]
13 workflow_dispatch:
14 schedule:
15 - cron: "0 0 * * *"
16
17 jobs:
18 sonar:
19 name: SonarCloud
20 uses: ansible/ansible-content-actions/.github/workflows/sonarcloud.yaml@main
21 with:
22 python_version: "3.12"
23 galaxy_dependencies: |
24 git+https://github.com/ansible-collections/ansible.utils.git
25 git+https://github.com/ansible-collections/ansible.netcommon.git
26 secrets:
27 SONAR_TOKEN: ${{ secrets.ANSIBLE_COLLECTIONS_ORG_SONAR_TOKEN_CICD_BOT }}
28 changelog:
29 uses: ansible/ansible-content-actions/.github/workflows/changelog.yaml@main
30 if: github.event_name == 'pull_request'
31 build-import:
32 uses: ansible/ansible-content-actions/.github/workflows/build_import.yaml@main
33 ansible-lint:
34 uses: ansible/ansible-content-actions/.github/workflows/ansible_lint.yaml@main
35 sanity:
36 uses: ansible/ansible-content-actions/.github/workflows/sanity.yaml@main
37 unit-galaxy:
38 uses: ansible/ansible-content-actions/.github/workflows/unit.yaml@main
39 unit-source:
40 uses: ansible-network/github_actions/.github/workflows/unit_source.yml@main
41 with:
42 collection_pre_install: >-
43 git+https://github.com/ansible-collections/ansible.utils.git
44 git+https://github.com/ansible-collections/ansible.netcommon.git
45
46 report-status:
47 if: ${{ always() && github.event_name == 'schedule' }}
48 needs:
49 - changelog
50 - build-import
51 - sanity
52 - unit-galaxy
53 - unit-source
54 - ansible-lint
55 uses: ansible/ansible-content-actions/.github/workflows/upload_upstream_results.yaml@main
56 with:
57 job_context: ${{ toJSON(needs) }}
58 component_name: ${{ github.event.repository.name }}
59 UPLOAD_USER: ${{ vars.PDE_ORG_RESULTS_AGGREGATOR_UPLOAD_USER }}
60 UPLOAD_URL: ${{ vars.PDE_ORG_RESULTS_AGGREGATOR_UPLOAD_URL }}
61 secrets:
62 UPLOAD_PASSWORD: ${{ secrets.PDE_ORG_RESULTS_UPLOAD_PASSWORD }}
63
64 all_green:
65 if: ${{ always() }}
66 needs:
67 - changelog
68 - build-import
69 - sanity
70 - unit-galaxy
71 - unit-source
72 - ansible-lint
73 - sonar
74 - report-status
75 runs-on: ubuntu-latest
76 steps:
77 - run: >-
78 python -c "assert 'failure' not in
79 set([
80 '${{ needs.changelog.result }}',
81 '${{ needs.sanity.result }}',
82 '${{ needs.unit-galaxy.result }}',
83 '${{ needs.ansible-lint.result }}',
84 '${{ needs.unit-source.result }}',
85 '${{ needs.sonar.result }}',
86 '${{ needs.report-status.result }}'
87 ])"