File: integration.yml

package info (click to toggle)
cloud-init 25.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 12,412 kB
  • sloc: python: 135,894; sh: 3,883; makefile: 141; javascript: 30; xml: 22
file content (71 lines) | stat: -rw-r--r-- 2,260 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
name: Integration Tests

on:
  pull_request:
    branches-ignore:
      - 'ubuntu/**'
  push:
    branches:
      - main

concurrency:
  group: 'ci-${{ github.workflow }}-${{ github.ref }}'
  cancel-in-progress: true

defaults:
  run:
    shell: sh -ex {0}

env:
  RELEASE: plucky

jobs:
  build-package-and-run-tests:
    runs-on: ubuntu-24.04
    steps:
      - name: "Checkout"
        uses: actions/checkout@v4
        with:
          # Fetch all tags for tools/read-version
          fetch-depth: 0
      - name: Prepare dependencies
        run: |
          sudo DEBIAN_FRONTEND=noninteractive apt-get update
          sudo DEBIAN_FRONTEND=noninteractive apt-get -y install \
            ubuntu-dev-tools \
            tox \
            wireguard \
            $(\
              ./tools/read-dependencies                   \
                --requirements-file requirements.txt      \
                --requirements-file test-requirements.txt \
                --distro ubuntu                           \
                --system-pkg-names 2> /dev/null           \
                | tr '\n' ' '                             \
            )
      - name: Build package
        run: |
          DEB_BUILD_OPTIONS=nocheck ./packages/bddeb -d --release ${{ env.RELEASE }}
          cp cloud-init_all.deb ${{ runner.temp }}
      - name: Archive debs as artifacts
        uses: actions/upload-artifact@v4
        with:
          name: 'cloud-init-${{ env.RELEASE }}-deb'
          path: '${{ runner.temp }}/cloud-init*.deb'
          retention-days: 3
      - name: Setup LXD
        uses: canonical/setup-lxd@v0.1.2
        with:
          channel: 6/stable
      - name: Verify deb package
        run: |
          ls -hal '${{ runner.temp }}'
          echo ${{ runner.temp }}/cloud-init*.deb || true
          ls -hal ${{ runner.temp }}/cloud-init*.deb || true
      - name: Set up Pycloudlib
        run: |
          ssh-keygen -P "" -q -f ~/.ssh/id_rsa
          echo "[lxd]" > /home/$USER/.config/pycloudlib.toml
      - name: Run integration Tests
        run: |
          CLOUD_INIT_CLOUD_INIT_SOURCE="$(ls ${{ runner.temp }}/cloud-init*.deb)" CLOUD_INIT_OS_IMAGE=${{ env.RELEASE }} tox -e integration-tests-ci -- --color=yes tests/integration_tests/