Skip to content

Commit 4dc3eb6

Browse files
committed
CI migration (quincy)
1 parent c2bdac4 commit 4dc3eb6

13 files changed

+153
-285
lines changed

.github/workflows/build-and-test.yml

+102
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
name: Build/Test
2+
3+
on:
4+
workflow_call:
5+
6+
jobs:
7+
lint:
8+
name: Lint
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v4
13+
14+
- name: Install dependencies
15+
run: python3 -m pip install tox
16+
17+
- name: Run linters
18+
run: tox -e pep8
19+
20+
unit-test:
21+
name: Unit tests
22+
runs-on: ubuntu-latest
23+
timeout-minutes: 5
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v4
27+
28+
- name: Install dependencies
29+
run: |
30+
sudo apt-get -qq install libxslt-dev libxml2-dev python3-lxml
31+
python -m pip install tox
32+
33+
- name: Run tests
34+
run: tox -e py3
35+
36+
build:
37+
name: Build the charm
38+
runs-on: ubuntu-latest
39+
steps:
40+
- name: Checkout
41+
uses: actions/checkout@v4
42+
with:
43+
fetch-depth: 1
44+
45+
- name: Setup LXD
46+
uses: canonical/setup-lxd@v0.1.1
47+
with:
48+
channel: 5.20/stable
49+
50+
- name: Install dependencies
51+
run: python -m pip install tox
52+
53+
- name: Build charm(s)
54+
id: builder
55+
run: |
56+
sudo snap install charmcraft --classic
57+
tox -e build
58+
59+
- name: Upload built charm
60+
uses: actions/upload-artifact@v3
61+
with:
62+
name: charms
63+
path: "*.charm"
64+
65+
functional-test:
66+
needs:
67+
- lint
68+
- unit-test
69+
- build
70+
name: Functional tests
71+
runs-on: ubuntu-latest
72+
steps:
73+
74+
- name: Download charm
75+
uses: actions/download-artifact@v3
76+
with:
77+
name: charms
78+
path: ~/artifacts/
79+
80+
- name: Checkout code
81+
uses: actions/checkout@v3
82+
with:
83+
fetch-depth: 0
84+
85+
- name: Setup LXD
86+
uses: canonical/setup-lxd@v0.1.1
87+
with:
88+
# pin lxd to LTS release.
89+
channel: 5.21/stable
90+
91+
- name: Install dependencies
92+
run: |
93+
python -m pip install tox
94+
sudo snap install juju
95+
mkdir -p ~/.local/share/juju
96+
juju bootstrap localhost
97+
98+
- name: Run jammy-antelope tests
99+
run: |
100+
date
101+
mv ~/artifacts/ceph-fs.charm ./
102+
tox -c src -e func-target -- jammy-antelope

.github/workflows/pr.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
name: PR
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
build:
8+
uses: ./.github/workflows/build-and-test.yml

src/test-requirements.txt

+3-2
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@
88
tox
99

1010
# Functional Test Requirements (let Zaza's dependencies solve all dependencies here!)
11-
git+https://github.com/openstack-charmers/zaza.git@stable/antelope#egg=zaza
12-
git+https://github.com/openstack-charmers/zaza-openstack-tests.git@stable/antelope#egg=zaza.openstack
11+
git+https://github.com/openstack-charmers/zaza.git#egg=zaza
12+
#git+https://github.com/openstack-charmers/zaza-openstack-tests.git@stable/antelope#egg=zaza.openstack
13+
git+https://github.com/lmlg/zaza-openstack-tests.git@ceph-fs-standalone#egg=zaza.openstack

src/tests/bundles/focal-xena.yaml

-45
This file was deleted.

src/tests/bundles/focal-yoga.yaml

-44
This file was deleted.

src/tests/bundles/jammy-antelope.yaml

+22-5
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,23 @@ local_overlay_enabled: False
55

66
series: &series jammy
77

8+
machines:
9+
'0':
10+
'1':
11+
constraints: virt-type=virtual-machine mem=4G
12+
'2':
13+
constraints: virt-type=virtual-machine mem=4G
14+
'3':
15+
constraints: virt-type=virtual-machine mem=4G
16+
817
applications:
918
ubuntu: # used to test mounts
1019
charm: ch:ubuntu
1120
num_units: 2
21+
to:
22+
- '2'
23+
- '3'
24+
1225
ceph-fs:
1326
charm: ../../../ceph-fs.charm
1427
num_units: 1
@@ -17,24 +30,28 @@ applications:
1730
pool-type: erasure-coded
1831
ec-profile-k: 4
1932
ec-profile-m: 2
33+
to:
34+
- '2'
2035

2136
ceph-osd:
2237
charm: ch:ceph-osd
23-
num_units: 6
24-
storage:
25-
osd-devices: 'cinder,10G'
38+
num_units: 1
2639
options:
2740
osd-devices: '/dev/test-non-existent'
2841
source: *openstack-origin
29-
channel: quincy/edge
42+
channel: latest/edge
43+
to:
44+
- '1'
3045

3146
ceph-mon:
3247
charm: ch:ceph-mon
3348
num_units: 3
3449
options:
3550
monitor-count: '3'
3651
source: *openstack-origin
37-
channel: quincy/edge
52+
channel: latest/edge
53+
to:
54+
- '0'
3855

3956
relations:
4057
- - 'ceph-mon:mds'

src/tests/bundles/jammy-yoga.yaml

-44
This file was deleted.

src/tests/bundles/jammy-zed.yaml

-44
This file was deleted.

0 commit comments

Comments
 (0)