Skip to content

Commit f769872

Browse files
committed
WiP
Body (72 chars) Reference: Signed-off-by: Jan Richter <jarichte@redhat.com>
1 parent 7bd0d8c commit f769872

1 file changed

Lines changed: 67 additions & 0 deletions

File tree

.github/workflows/test.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: CI
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
test:
7+
runs-on: ubuntu-latest
8+
container: quay.io/avocado-framework/avocado-vt-ci-fedora-35
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
avocado_src:
13+
- ''
14+
- 'avocado-framework<93.0'
15+
- 'avocado-framework<104.0'
16+
- 'git+https://github.com/avocado-framework/avocado#egg=avocado_framework'
17+
- 'git+https://github.com/avocado-framework/avocado@92lts#egg=avocado_framework'
18+
- 'git+https://github.com/avocado-framework/avocado@103lts#egg=avocado_framework'
19+
setup:
20+
- 'setup.py develop --user'
21+
- '-m pip install .'
22+
- '-m pip install PYPI_UPLOAD/*.whl'
23+
vt_type:
24+
- qemu
25+
- libvirt
26+
27+
steps:
28+
- name: Checkout code
29+
uses: actions/checkout@v4
30+
31+
- name: Build
32+
run: |
33+
(echo ${{ matrix.setup }} | grep -v PYPI_UPLOAD) || make pypi
34+
35+
- name: Setup
36+
run: |
37+
python3 --version
38+
test -z ${{ matrix.avocado_src }} || python3 -m pip install ${{ matrix.avocado_src }}
39+
python3 ${{ matrix.setup }}
40+
41+
- name: Bootstrap
42+
run: |
43+
# Pin the versions of tp-qemu and tp-libvirt to known working versions.
44+
# These versions can be bumped at any time, but provide better understanding
45+
# of regressions or version update requirements on the test providers side.
46+
python3 -c "from virttest.asset import ConfigLoader; cl = ConfigLoader('virttest/test-providers.d/io-github-autotest-qemu.ini'); cl.set('provider', 'ref', '33ed9b0ac6e4255877ff109a1d91fa84c9097dc5'); cl.save()"
47+
python3 -c "from virttest.asset import ConfigLoader; cl = ConfigLoader('virttest/test-providers.d/io-github-autotest-libvirt.ini'); cl.set('provider', 'ref', 'e6af7700f879fe1547bfb1421439121d35c919bd'); cl.save()"
48+
python3 -m avocado vt-bootstrap --vt-type=${{ matrix.vt_type }} --vt-skip-verify-download-assets --yes-to-all
49+
50+
- name: List
51+
run: |
52+
PATH=~/.local/bin:$PATH python3 -m avocado list --vt-save-config=/tmp/config --vt-type=${{ matrix.vt_type }} -- boot | tee /tmp/list
53+
test ${{ matrix.vt_type }} == "qemu" || test $(wc -l < /tmp/list) -gt 50
54+
test ${{ matrix.vt_type }} == "libvirt" || test $(wc -l < /tmp/list) -eq 1
55+
PATH=~/.local/bin:$PATH python3 -m avocado list --vt-config=/tmp/config --vt-type=${{ matrix.vt_type }} -- boot | tee /tmp/list_from_config
56+
diff /tmp/list /tmp/list_from_config
57+
python3 -m avocado vt-list-guests --vt-type=${{ matrix.vt_type }}
58+
python3 -m avocado vt-list-archs --vt-type=${{ matrix.vt_type }}
59+
60+
- name: Dry Run
61+
run: |
62+
PATH=~/.local/bin:$PATH python3 -m avocado --show all run --vt-type=${{ matrix.vt_type }} --dry-run -- io-github-autotest-qemu.boot
63+
64+
- name: Run tests
65+
if: matrix.vt_type != 'libvirt'
66+
run: |
67+
PATH=~/.local/bin:$PATH python3 -m avocado --show all run --vt-type=${{ matrix.vt_type }} --vt-extra-params nettype=user -- io-github-autotest-qemu.boot io-github-autotest-qemu.qemu_disk_img.convert.base_to_raw io-github-autotest-qemu.commit_with_backing.default

0 commit comments

Comments
 (0)