-
Notifications
You must be signed in to change notification settings - Fork 14
84 lines (83 loc) · 2.62 KB
/
ci.yml
File metadata and controls
84 lines (83 loc) · 2.62 KB
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
72
73
74
75
76
77
78
79
80
81
82
83
84
name: CI
on:
pull_request:
branches:
- main
workflow_dispatch:
jobs:
lint:
name: Check code style
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v2
- name: Install precommit
run: pip install pre-commit
- name: Check lint
run: pre-commit run ruff-check --all-files
- name: Check format
run: pre-commit run ruff-format --all-files
test:
name: CI on python${{ matrix.python }} via ${{ matrix.os }}
runs-on: ${{ matrix.os }}
needs: lint
strategy:
matrix:
include:
- os: ubuntu-24.04
python: "3.12"
steps:
- uses: actions/checkout@v2
- name: Install packages
run: sudo apt install podman golang-github-containernetworking-plugin-dnsname sqlite3 jq
- name: Create virtualenv
run: python3 -m venv venv
- name: Install
run: ./venv/bin/pip3 install -e .
- name: Set owner for /dev/loop-control
run: sudo chown $(whoami) /dev/loop-control
- name: Configure
run: ./venv/bin/ceph-devstack config set containers.postgres.count 0
- name: Doctor
run: ./venv/bin/ceph-devstack -v doctor --fix
- name: Build
run: ./venv/bin/ceph-devstack -v build
- name: Create
run: ./venv/bin/ceph-devstack -v create
- name: Start
run: ./venv/bin/ceph-devstack -v start
- name: Check Status
run: podman ps -a
- name: Wait
run: ./venv/bin/ceph-devstack wait teuthology
- name: Dump logs
if: success() || failure()
run: podman logs -f teuthology
- name: Create archive
if: success() || failure()
run: |
mkdir -p /tmp/artifacts
- name: Dump job data
if: success() || failure()
run: |
podman cp paddles:/paddles/dev.db /tmp/
sqlite3 /tmp/dev.db ".output stdout" ".mode json" "select * from jobs" | jq | tee /tmp/artifacts/jobs.json
- name: Upload jobs.json
if: success() || failure()
uses: actions/upload-artifact@v4
with:
name: jobs
path: /tmp/artifacts/jobs.json
- name: Create tarball of log archive
if: success() || failure()
run: |
tar -czf /tmp/artifacts/archive.tar ~/.local/share/ceph-devstack/archive/
- name: Upload log archive
if: success() || failure()
uses: actions/upload-artifact@v4
with:
name: archive
path: /tmp/artifacts/archive.tar
- name: Stop
run: ./venv/bin/ceph-devstack -v stop
- name: Remove
run: ./venv/bin/ceph-devstack -v remove