Debian Codegraph @

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