forked from canonical/cloud-init
-
Notifications
You must be signed in to change notification settings - Fork 1
119 lines (114 loc) · 3.78 KB
/
11-dispatch-common.yml
File metadata and controls
119 lines (114 loc) · 3.78 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
name: "Dispatch: Integration"
on:
workflow_dispatch:
inputs:
release:
required: true
type: choice
options:
- questing
- jammy
- noble
- resolute
platform:
required: true
type: choice
options:
- lxd_container
- lxd_vm
image_type:
type: choice
options:
- generic
- minimal
required: false
install_source:
required: false
type: string
filter_tests:
required: false
type: string
workflow_call:
inputs:
release:
required: true
type: string
platform:
required: true
type: string
image_type:
required: false
type: string
install_source:
required: false
type: string
filter_tests:
required: false
type: string
jobs:
lxc:
runs-on: ubuntu-latest
if: github.repository == 'canonical/cloud-init'
env:
CLOUD_INIT_PLATFORM: ${{ inputs.platform || 'lxd_container' }}
CLOUD_INIT_OS_IMAGE: ${{ inputs.release || 'questing' }}
CLOUD_INIT_OS_IMAGE_TYPE: ${{ inputs.image_type || 'generic' }}
CLOUD_INIT_CLOUD_INIT_SOURCE: ${{ inputs.install_source || 'ppa:cloud-init-dev/daily' }}
CLOUD_INIT_LOCAL_LOG_PATH: ${{ github.workspace }}/cloud_init_test_logs
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup LXD
uses: canonical/setup-lxd@8c6a87bfb56aa48f3fb9b830baa18562d8bfd4ee # v0.1.2
with:
channel: 6/stable
- name: Clean workspace
run: |
rm -rf ${{ github.workspace }}/cloud_init_test_logs/
- name: Setup pycloudlib
run: |
ssh-keygen -P "" -q -f ~/.ssh/id_rsa
echo "[lxd]" > /home/$USER/.config/pycloudlib.toml
- name: Install Dependencies
run: |
sudo DEBIAN_FRONTEND=noninteractive apt-get -qy update
sudo DEBIAN_FRONTEND=noninteractive apt-get -qy install tox distro-info-data devscripts
- name: Run integration Tests
run: |
tox -e integration-tests -- --junitxml="${{ github.workspace }}/reports/junit-report-${{ inputs.platform }}-${{ inputs.release }}.xml" --color=yes ${{ inputs.filter_tests || 'tests/integration_tests' }}
- name: Publish Test Report with Insights
if: always()
uses: ctrf-io/github-test-reporter@024bc4b64d997ca9da86833c6b9548c55c620e40 # v1.0.26
with:
report-path: '${{ github.workspace }}/reports/junit-report-${{ inputs.platform}}-${{ inputs.release }}.xml'
integrations-config: |
{
"junit-to-ctrf": {
"enabled": true,
"action": "convert",
"options": {
"output": "./reports/ctrf-report-${{ inputs.platform }}-${{ inputs.release }}-${{ inputs.image_type }}.json",
"toolname": "junit-to-ctrf",
"useSuiteName": false,
"env": {
"appName": "my-app"
}
}
}
}
summary-delta-report: true
insights-report: true
flaky-rate-report: true
slowest-report: true
upload-artifact: true
github-report: true
artifact-name: ctrf-report-${{ inputs.platform }}-${{inputs.release}}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload failure artifacts
if: failure()
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: failure-${{ github.job }}
path: ${{ github.workspace }}/cloud_init_test_logs/
retention-days: 2