File: nightly-spread.yaml

package info (click to toggle)
snapd 2.72-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 80,412 kB
  • sloc: sh: 16,506; ansic: 16,211; python: 11,213; makefile: 1,919; exp: 190; awk: 58; xml: 22
file content (209 lines) | stat: -rw-r--r-- 8,797 bytes parent folder | download
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
name: Nightly spread executions

# See https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#onschedule
on:
  schedule:
    # usual nitghtly run
    - cron: '0 2 * * *'
    # from current
    - cron: '0 3 * * *'
    # experimental features and openstack
    - cron: '0 6 * * *'
  workflow_dispatch:
    inputs:
      job:
        type: choice
        description: Job to run
        options:
          - spread-nightly
          - spread-nightly-google
          - spread-test-build-from-current
          - spread-test-experimental
          - spread-test-openstack
          - spread-master-fundamental
          - spread-master-not-fundamental
          - spread-master-nested

jobs:

  spread-nightly:
    if: ${{ github.event.schedule == '0 2 * * *' || (github.event_name == 'workflow_dispatch' && inputs.job == 'spread-nightly') }}
    uses: ./.github/workflows/spread-tests.yaml
    with:
      runs-on: '["self-hosted", "spread-enabled"]'
      group: openstack-ps7
      backend: openstack-ps7
      systems: 'ALL'
      tasks: 'tests/nightly/...'
      rules: ''
      use-snapd-snap-from-master: true

  spread-nightly-google:
    if: ${{ github.event.schedule == '0 3 * * *' || (github.event_name == 'workflow_dispatch' && inputs.job == 'spread-nightly-google') }}
    uses: ./.github/workflows/spread-tests.yaml
    with:
      runs-on: '["self-hosted", "spread-enabled"]'
      group: ${{ matrix.group }}
      backend: ${{ matrix.backend }}
      systems: ${{ matrix.systems }}
      tasks: ${{ matrix.tasks }}
      rules: ''
      use-snapd-snap-from-master: true
    strategy:
      fail-fast: false
      matrix:
        include:
          - group: jammy
            backend: google
            systems: 'ubuntu-22.04-64'
            tasks: 'tests/main/apparmor-prompting-integration-tests tests/main/interfaces-requests-activates-handlers'
          - group: google
            backend: google
            systems: 'ALL'
            tasks: 'tests/main/microk8s-smoke tests/main/download-timeout tests/main/snap-network-errors tests/main/snapd-snap:lxd tests/main/apparmor-prompting-support tests/main/proxy'
          - group: google-core
            backend: google-core
            systems: 'ALL'
            tasks: 'tests/main/microk8s-smoke tests/main/download-timeout tests/main/snap-network-errors tests/main/snapd-snap:lxd tests/main/apparmor-prompting-support tests/main/proxy'
          - group: google-distro
            backend: google-distro
            systems: 'ALL'
            tasks: 'tests/main/microk8s-smoke tests/main/download-timeout tests/main/snap-network-errors tests/main/snapd-snap:lxd tests/main/apparmor-prompting-support tests/main/proxy'
          - group: google-arm
            backend: google-distro
            systems: 'ubuntu-22.04-arm-64 ubuntu-core-24-arm-64'
            tasks: 'tests/main/microk8s-smoke tests/main/download-timeout tests/main/snap-network-errors tests/main/snapd-snap:lxd tests/main/apparmor-prompting-support tests/main/proxy'

  spread-test-build-from-current:
    if: ${{ github.event.schedule == '0 6 * * *' || (github.event_name == 'workflow_dispatch' && inputs.job == 'spread-test-build-from-current') }}
    uses: ./.github/workflows/spread-tests.yaml
    with:
      runs-on: '["self-hosted", "spread-enabled"]'
      group: ${{ matrix.group }}
      backend: ${{ matrix.backend }}
      systems: ${{ matrix.systems }}
      tasks: 'tests/...'
      rules: ''
      use-snapd-snap-from-master: true
      spread-env: "SPREAD_SNAPD_DEB_FROM_REPO=false SPREAD_MODIFY_CORE_SNAP_FOR_REEXEC=0 SPREAD_SNAP_REEXEC=0"
    strategy:
      fail-fast: false
      matrix:
        include:
          - group: openstack-ps7
            backend: openstack-ps7
            systems: 'ubuntu-18.04-64 ubuntu-20.04-64 ubuntu-22.04-64 ubuntu-24.04-64 debian-12-64'
          - group: openstack
            backend: openstack
            systems: 'debian-sid-64'

  spread-test-experimental:
    if: ${{ github.event.schedule == '0 3 * * *' || (github.event_name == 'workflow_dispatch' && inputs.job == 'spread-test-experimental') }}
    uses: ./.github/workflows/spread-tests.yaml
    with:
      runs-on: '["self-hosted", "spread-enabled"]'
      group: 'openstack-ps7'
      backend: 'openstack-ps7'
      systems: 'ubuntu-20.04-64 ubuntu-22.04-64 ubuntu-24.04-64 ubuntu-core-24-64'
      tasks: 'tests/...'
      rules: ''
      use-snapd-snap-from-master: true
      spread-experimental-features: gate-auto-refresh-hook

  read-systems:
    runs-on: ubuntu-latest
    outputs:
      fundamental-systems: ${{ steps.read-systems.outputs.fundamental-systems }}
      non-fundamental-systems: ${{ steps.read-systems.outputs.non-fundamental-systems }}
      nested-systems: ${{ steps.read-systems.outputs.nested-systems }}
    steps:
      - name: Checkout code
        uses: actions/checkout@v4

      - name: Read matrix file
        id: read-systems
        shell: bash
        run: |
          echo "fundamental-systems=$(jq -c . ./.github/workflows/data-fundamental-systems.json)" >> $GITHUB_OUTPUT
          echo "non-fundamental-systems=$(jq -c . ./.github/workflows/data-non-fundamental-systems.json)" >> $GITHUB_OUTPUT
          echo "nested-systems=$(jq -c . ./.github/workflows/data-nested-systems.json)" >> $GITHUB_OUTPUT

  spread-master-fundamental:
    if: ${{ github.event.schedule == '0 3 * * *' || (github.event_name == 'workflow_dispatch' && inputs.job == 'spread-master-fundamental') }}
    uses: ./.github/workflows/spread-tests.yaml
    name: "spread master ${{ matrix.group }}"
    needs: [read-systems]
    with:
      # Github doesn't support passing sequences as parameters.
      # Instead here we create a json array and pass it as a string.
      # Then in the spread workflow it turns it into a sequence
      # using the fromJSON expression.
      runs-on: '["self-hosted", "spread-enabled"]'
      group: ${{ matrix.group }}
      backend: ${{ matrix.backend }}
      alternative-backend: ${{ matrix.alternative-backend }}
      systems: ${{ matrix.systems }}
      tasks: ${{ matrix.tasks }}
      rules: ${{ matrix.rules }}
      is-fundamental: true
      use-snapd-snap-from-master: true
    strategy:
      fail-fast: false
      matrix: ${{ fromJson(needs.read-systems.outputs.fundamental-systems) }}

  spread-master-not-fundamental:
    if: ${{ github.event.schedule == '0 3 * * *' || (github.event_name == 'workflow_dispatch' && inputs.job == 'spread-master-not-fundamental') }}
    uses: ./.github/workflows/spread-tests.yaml
    name: "spread master ${{ matrix.group }}"
    needs: [read-systems]
    with:
      # Github doesn't support passing sequences as parameters.
      # Instead here we create a json array and pass it as a string.
      # Then in the spread workflow it turns it into a sequence
      # using the fromJSON expression.
      runs-on: '["self-hosted", "spread-enabled"]'
      group: ${{ matrix.group }}
      backend: ${{ matrix.backend }}
      alternative-backend: ${{ matrix.alternative-backend }}
      systems: ${{ matrix.systems }}
      tasks: ${{ matrix.tasks }}
      rules: ${{ matrix.rules }}
      use-snapd-snap-from-master: true
    strategy:
      fail-fast: false
      matrix: ${{ fromJson(needs.read-systems.outputs.non-fundamental-systems) }}

  spread-master-nested:
    if: ${{ github.event.schedule == '0 3 * * *' || (github.event_name == 'workflow_dispatch' && inputs.job == 'spread-master-nested') }}
    uses: ./.github/workflows/spread-tests.yaml
    name: "spread master ${{ matrix.group }}"
    needs: [read-systems]
    with:
      # Github doesn't support passing sequences as parameters.
      # Instead here we create a json array and pass it as a string.
      # Then in the spread workflow it turns it into a sequence
      # using the fromJSON expression.
      runs-on: '["self-hosted", "spread-enabled"]'
      group: ${{ matrix.group }}
      backend: ${{ matrix.backend }}
      alternative-backend: ${{ matrix.alternative-backend }}
      systems: ${{ matrix.systems }}
      tasks: ${{ matrix.tasks }}
      rules: ${{ matrix.rules }}
      use-snapd-snap-from-master: true
    strategy:
      fail-fast: false
      matrix: ${{ fromJson(needs.read-systems.outputs.nested-systems) }}

  re-run:
    permissions:
      actions: write
    needs: [read-systems, spread-master-fundamental, spread-master-not-fundamental, spread-master-nested]
    # If the spread tests ended in failure, rerun the workflow up to maximum-reruns times
    if: failure() && fromJSON(github.run_attempt) <= 1
    runs-on: ubuntu-latest
    steps:
      - env:
          GH_REPO: ${{ github.repository }}
          GH_TOKEN: ${{ github.token }}
        run: gh workflow run rerun.yaml -F run_id=${{ github.run_id }}