Debian Codegraph @

ansible_collections/cisco/ios/.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 sonar_scanner_java_opts: "-Xss2m"
27 secrets:
28 SONAR_TOKEN: ${{ secrets.ANSIBLE_COLLECTIONS_ORG_SONAR_TOKEN_CICD_BOT }}
29
30 changelog:
31 uses: ansible/ansible-content-actions/.github/workflows/changelog.yaml@main
32 if: github.event_name == 'pull_request_target'
33
34 build-import:
35 uses: ansible/ansible-content-actions/.github/workflows/build_import.yaml@main
36
37 ansible-lint:
38 uses: ansible/ansible-content-actions/.github/workflows/ansible_lint.yaml@main
39
40 sanity:
41 uses: ansible/ansible-content-actions/.github/workflows/sanity.yaml@main
42
43 unit-galaxy:
44 uses: ansible/ansible-content-actions/.github/workflows/unit.yaml@main
45
46 unit-source:
47 uses: ansible-network/github_actions/.github/workflows/unit_source.yml@main
48 with:
49 collection_pre_install: >-
50 git+https://github.com/ansible-collections/ansible.utils.git
51 git+https://github.com/ansible-collections/ansible.netcommon.git
52
53 report-status:
54 if: ${{ always() && github.event_name == 'schedule' }}
55 needs:
56 - changelog
57 - build-import
58 - sanity
59 - unit-galaxy
60 - ansible-lint
61 - unit-source
62 uses: ansible/ansible-content-actions/.github/workflows/upload_upstream_results.yaml@main
63 with:
64 job_context: ${{ toJSON(needs) }}
65 component_name: ${{ github.event.repository.name }}
66 UPLOAD_USER: ${{ vars.PDE_ORG_RESULTS_AGGREGATOR_UPLOAD_USER }}
67 UPLOAD_URL: ${{ vars.PDE_ORG_RESULTS_AGGREGATOR_UPLOAD_URL }}
68 secrets:
69 UPLOAD_PASSWORD: ${{ secrets.PDE_ORG_RESULTS_UPLOAD_PASSWORD }}
70
71 all_green:
72 if: ${{ always() }}
73 needs:
74 - changelog
75 - build-import
76 - sanity
77 - unit-galaxy
78 - ansible-lint
79 - sonar
80 - report-status
81 runs-on: ubuntu-latest
82 steps:
83 - run: >-
84 python -c "assert 'failure' not in
85 set([
86 '${{ needs.changelog.result }}',
87 '${{ needs.build-import.result }}',
88 '${{ needs.sanity.result }}',
89 '${{ needs.unit-galaxy.result }}',
90 '${{ needs.ansible-lint.result }}',
91 '${{ needs.unit-source.result }}',
92 '${{ needs.sonar.result }}'
93 ])"