Skip to content

Commit 3db48f1

Browse files
committed
[TMP] test build
1 parent 9a52f29 commit 3db48f1

File tree

3 files changed

+39
-15
lines changed

3 files changed

+39
-15
lines changed

.github/workflows/build-init.yml

Lines changed: 32 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,35 +8,53 @@ on:
88
paths-ignore: ["docs/**"]
99
jobs:
1010
build-init:
11-
# this job initialises the vagrant box
12-
# then just runs some initial ansible tasks
13-
# for the full build, see build.yml
14-
runs-on: macos-latest
15-
env:
16-
VAGRANT_NO_GUI: true
17-
VAGRANT_ON_GH: true
11+
# this job tests ansible provisioning in Docker containers
12+
# Tests on both ARM64 and AMD64 architectures using Ubuntu runners
13+
runs-on: ${{ matrix.os }}
14+
strategy:
15+
matrix:
16+
os: [ubuntu-latest]
1817

1918
steps:
2019
- uses: actions/checkout@v4
21-
- name: set up Python
20+
21+
- name: Set up Python
2222
uses: actions/setup-python@v5
2323
with:
24-
python-version: 3.9
24+
python-version: 3.13
2525

26-
- name: install pip requirements
26+
- name: Install pip requirements
2727
run: |
2828
pip install --upgrade pip
2929
pip install wheel
3030
pip install -r requirements.txt
3131
32-
- name: install ansible requirements
32+
- name: Install Ansible requirements
3333
run: ansible-galaxy install -r requirements.yml
3434

35-
- name: Build Vagrant Box
36-
run: ANSIBLE_ARGS="--tags init,ci_test" vagrant up
35+
- name: Install Docker collection for CI
36+
run: ansible-galaxy collection install community.docker
37+
38+
- name: Start Ubuntu Docker container
39+
run: |
40+
docker run -d --name quantum-mobile \
41+
-v ${{ github.workspace }}:/workspace \
42+
ubuntu:24.04 \
43+
sleep infinity
44+
45+
- name: Prepare container for Ansible
46+
run: |
47+
docker exec quantum-mobile bash -c "
48+
apt-get update &&
49+
apt-get install -y python3 sudo systemd
50+
"
51+
52+
- name: Run Ansible provisioning
53+
run: ansible-playbook --limit docker-ci -e build_hosts=docker-ci --tags init,ci_test playbook-build.yml
3754

3855
- name: Archive ansible log
56+
if: always()
3957
uses: actions/upload-artifact@v4
4058
with:
41-
name: ansible-log
59+
name: ansible-log-${{ matrix.os }}
4260
path: ansible.log

.github/workflows/build-vagrant.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
- name: set up Python
2929
uses: actions/setup-python@v5
3030
with:
31-
python-version: 3.9
31+
python-version: 3.13
3232

3333
- name: install pip requirements
3434
run: |

inventory.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,12 @@ all:
6767
ansible_ssh_common_args: "-F vagrant-ssh"
6868
ansible_user: vagrant
6969

70+
docker-ci:
71+
ansible_connection: community.docker.docker
72+
ansible_host: quantum-mobile
73+
ansible_user: root
74+
ansible_python_interpreter: /usr/bin/python3
75+
7076
docker:
7177
# see playbook-docker.yml to start container
7278
cloud_platform: docker

0 commit comments

Comments
 (0)