-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (51 loc) · 1.68 KB
/
ci-vm.yml
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
# based on https://github.com/ruzickap/ansible-my_workstation/blob/main/.github/workflows/fedora.yml
name: CI in Virtualbox (slow)
on:
push:
branches:
- main
paths:
- 'Vagrantfile'
- '.github/workflows/ci-vm.yml'
- '.playbook.yaml'
- 'git-repos.txt'
- 'vm-resources/**'
workflow_dispatch:
inputs:
uploadVmImage:
description: 'Upload image of the built vm'
required: true
default: 'false'
env:
VAGRANT_DEFAULT_PROVIDER: virtualbox
jobs:
virtualbox:
runs-on: macos-12
timeout-minutes: 100
steps:
- uses: actions/checkout@v4
- name: Start VM to build tools from source
run: |
vagrant up || ( vagrant destroy --force && vagrant up )
- name: Check systemd version
run: vagrant ssh --command "systemctl --version"
- name: Check systemd status
run: vagrant ssh --command "systemctl status"
- name: Check version of built tools
run: vagrant ssh --command "bash test-scripts/versions.sh"
- name: Check basic podman functionality
run: vagrant ssh --command "bash test-scripts/podman.sh"
- name: Check basic skopeo functionality
run: vagrant ssh --command "bash test-scripts/skopeo.sh"
- name: Run pytest tests
run: |
vagrant ssh --command "cd ~/test-scripts/ && pytest -sv"
- name: Package VM
run: |
vagrant package --debug --no-tty --output containers-lab.box --info info.json
- run: ls -la
- uses: actions/upload-artifact@v4
if: github.event.inputs.uploadVmImage
with:
name: containers-lab-vagrant-box
path: containers-lab.box