generated from ansible-collections/collection_template
-
Notifications
You must be signed in to change notification settings - Fork 94
82 lines (72 loc) · 2.32 KB
/
tests.yml
File metadata and controls
82 lines (72 loc) · 2.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
---
name: "CI"
concurrency:
group: ${{ github.head_ref || github.run_id }}-${{ github.event_name }}
cancel-in-progress: true
on: # yamllint disable-line rule:truthy
push:
branches: [main]
pull_request_target:
branches: [main]
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
jobs:
sonar:
name: SonarCloud
uses: ansible/ansible-content-actions/.github/workflows/sonarcloud.yaml@main
with:
python_version: "3.12"
test_command: "pytest tests/unit -v --cov-report xml --cov=./ -o 'addopts='"
secrets:
SONAR_TOKEN: ${{ secrets.ANSIBLE_COLLECTIONS_ORG_SONAR_TOKEN_CICD_BOT }}
changelog:
uses: ansible/ansible-content-actions/.github/workflows/changelog.yaml@main
if: github.event_name == 'pull_request_target'
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
integration:
uses: ansible/ansible-content-actions/.github/workflows/integration.yaml@main
report-status:
if: ${{ always() && github.event_name == 'schedule' }}
needs:
- changelog
- ansible-lint
- sanity
- unit-galaxy
- integration
uses: ansible/ansible-content-actions/.github/workflows/upload_upstream_results.yaml@main
with:
job_context: ${{ toJSON(needs) }}
component_name: ${{ github.event.repository.name }}
UPLOAD_USER: ${{ vars.PDE_ORG_RESULTS_AGGREGATOR_UPLOAD_USER }}
UPLOAD_URL: ${{ vars.PDE_ORG_RESULTS_AGGREGATOR_UPLOAD_URL }}
secrets:
UPLOAD_PASSWORD: ${{ secrets.PDE_ORG_RESULTS_UPLOAD_PASSWORD }}
all_green:
if: ${{ always() }}
needs:
- changelog
- sanity
- unit-galaxy
- ansible-lint
- integration
- sonar
- report-status
runs-on: ubuntu-latest
steps:
- run: >-
python -c "assert 'failure' not in
set([
'${{ needs.changelog.result }}',
'${{ needs.integration.result }}',
'${{ needs.sanity.result }}',
'${{ needs.unit-galaxy.result }}',
'${{ needs.ansible-lint.result }}',
'${{ needs.sonar.result }}',
'${{ needs.report-status.result }}'
])"