Mohammed Naser | 3f96178 | 2023-04-20 10:48:21 -0400 | [diff] [blame] | 1 | # Copyright (c) 2023 VEXXHOST, Inc. |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 4 | # not use this file except in compliance with the License. You may obtain |
| 5 | # a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 11 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 12 | # License for the specific language governing permissions and limitations |
| 13 | # under the License. |
| 14 | |
| 15 | name: ceph |
| 16 | |
| 17 | on: |
| 18 | pull_request: |
| 19 | push: |
| 20 | branches: |
| 21 | - main |
okozachenko1203 | 4371e49 | 2023-06-21 16:41:29 +1000 | [diff] [blame] | 22 | workflow_dispatch: |
| 23 | inputs: |
| 24 | debug_enabled: |
| 25 | type: boolean |
| 26 | description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)' |
| 27 | required: false |
| 28 | default: false |
Mohammed Naser | 3f96178 | 2023-04-20 10:48:21 -0400 | [diff] [blame] | 29 | |
| 30 | jobs: |
Mohammed Naser | 593ec01 | 2023-07-23 09:20:05 +0000 | [diff] [blame] | 31 | # ovs-debug: |
| 32 | # runs-on: ubuntu-20.04-16-cores |
| 33 | # if: github.event_name == 'workflow_dispatch' && inputs.debug_enabled |
| 34 | # steps: |
| 35 | # - name: Checkout project |
| 36 | # uses: actions/checkout@v3 |
okozachenko1203 | 4371e49 | 2023-06-21 16:41:29 +1000 | [diff] [blame] | 37 | |
Mohammed Naser | 593ec01 | 2023-07-23 09:20:05 +0000 | [diff] [blame] | 38 | # - name: Install Poetry |
| 39 | # run: pipx install poetry |
okozachenko1203 | 4371e49 | 2023-06-21 16:41:29 +1000 | [diff] [blame] | 40 | |
Mohammed Naser | 593ec01 | 2023-07-23 09:20:05 +0000 | [diff] [blame] | 41 | # - name: Setup Python |
| 42 | # uses: actions/setup-python@v4 |
| 43 | # with: |
| 44 | # cache: poetry |
okozachenko1203 | 4371e49 | 2023-06-21 16:41:29 +1000 | [diff] [blame] | 45 | |
Mohammed Naser | 593ec01 | 2023-07-23 09:20:05 +0000 | [diff] [blame] | 46 | # - name: Install dependencies |
| 47 | # run: poetry install --no-interaction --with dev |
okozachenko1203 | 4371e49 | 2023-06-21 16:41:29 +1000 | [diff] [blame] | 48 | |
Mohammed Naser | 593ec01 | 2023-07-23 09:20:05 +0000 | [diff] [blame] | 49 | # # NOTE(mnaser): LVM commands take a long time if there are any existing |
| 50 | # # loop devices created by "snapd", so we uninstall it. |
| 51 | # - name: Uninstall "snapd" |
| 52 | # run: sudo apt-get purge -y snapd |
okozachenko1203 | 4371e49 | 2023-06-21 16:41:29 +1000 | [diff] [blame] | 53 | |
Mohammed Naser | 593ec01 | 2023-07-23 09:20:05 +0000 | [diff] [blame] | 54 | # - name: Turn off swap |
| 55 | # run: sudo swapoff -a |
okozachenko1203 | 4371e49 | 2023-06-21 16:41:29 +1000 | [diff] [blame] | 56 | |
Mohammed Naser | 593ec01 | 2023-07-23 09:20:05 +0000 | [diff] [blame] | 57 | # - name: Run Molecule Converge |
| 58 | # run: poetry run molecule converge -s ceph |
okozachenko1203 | 4371e49 | 2023-06-21 16:41:29 +1000 | [diff] [blame] | 59 | |
Mohammed Naser | 593ec01 | 2023-07-23 09:20:05 +0000 | [diff] [blame] | 60 | # # Enable tmate debugging of manually-triggered workflows if the input option was provided |
| 61 | # - name: Setup tmate session |
| 62 | # if: ${{ failure() }} |
| 63 | # uses: mxschmitt/action-tmate@v3 |
| 64 | # timeout-minutes: 60 |
okozachenko1203 | 4371e49 | 2023-06-21 16:41:29 +1000 | [diff] [blame] | 65 | |
Mohammed Naser | 593ec01 | 2023-07-23 09:20:05 +0000 | [diff] [blame] | 66 | # - name: Run Molecule Destroy |
| 67 | # run: poetry run molecule destroy -s ceph |
okozachenko1203 | 4371e49 | 2023-06-21 16:41:29 +1000 | [diff] [blame] | 68 | |
Mohammed Naser | 593ec01 | 2023-07-23 09:20:05 +0000 | [diff] [blame] | 69 | # ovs: |
| 70 | # runs-on: ubuntu-20.04-16-cores |
| 71 | # if: github.event_name != 'workflow_dispatch' || !inputs.debug_enabled |
| 72 | # steps: |
| 73 | # - name: Checkout project |
| 74 | # uses: actions/checkout@v3 |
Mohammed Naser | b8cfb97 | 2023-07-22 18:42:24 +0000 | [diff] [blame] | 75 | |
Mohammed Naser | 593ec01 | 2023-07-23 09:20:05 +0000 | [diff] [blame] | 76 | # - name: Install Poetry |
| 77 | # run: pipx install poetry |
Mohammed Naser | b8cfb97 | 2023-07-22 18:42:24 +0000 | [diff] [blame] | 78 | |
Mohammed Naser | 593ec01 | 2023-07-23 09:20:05 +0000 | [diff] [blame] | 79 | # - name: Setup Python |
| 80 | # uses: actions/setup-python@v4 |
| 81 | # with: |
| 82 | # cache: poetry |
Mohammed Naser | b8cfb97 | 2023-07-22 18:42:24 +0000 | [diff] [blame] | 83 | |
Mohammed Naser | 593ec01 | 2023-07-23 09:20:05 +0000 | [diff] [blame] | 84 | # - name: Install dependencies |
| 85 | # run: poetry install --no-interaction --with dev |
Mohammed Naser | b8cfb97 | 2023-07-22 18:42:24 +0000 | [diff] [blame] | 86 | |
Mohammed Naser | 593ec01 | 2023-07-23 09:20:05 +0000 | [diff] [blame] | 87 | # # NOTE(mnaser): LVM commands take a long time if there are any existing |
| 88 | # # loop devices created by "snapd", so we uninstall it. |
| 89 | # - name: Uninstall "snapd" |
| 90 | # run: sudo apt-get purge -y snapd |
Mohammed Naser | b8cfb97 | 2023-07-22 18:42:24 +0000 | [diff] [blame] | 91 | |
Mohammed Naser | 593ec01 | 2023-07-23 09:20:05 +0000 | [diff] [blame] | 92 | # - name: Turn off swap |
| 93 | # run: sudo swapoff -a |
Mohammed Naser | b8cfb97 | 2023-07-22 18:42:24 +0000 | [diff] [blame] | 94 | |
Mohammed Naser | 593ec01 | 2023-07-23 09:20:05 +0000 | [diff] [blame] | 95 | # - name: Run Molecule |
| 96 | # run: poetry run molecule test -s ceph |
Mohammed Naser | b8cfb97 | 2023-07-22 18:42:24 +0000 | [diff] [blame] | 97 | |
Mohammed Naser | 727b5b6 | 2023-07-22 19:21:00 +0000 | [diff] [blame] | 98 | ovn-debug: |
| 99 | runs-on: ubuntu-20.04-16-cores |
Mohammed Naser | 593ec01 | 2023-07-23 09:20:05 +0000 | [diff] [blame] | 100 | # if: github.event_name == 'workflow_dispatch' && inputs.debug_enabled |
Mohammed Naser | 727b5b6 | 2023-07-22 19:21:00 +0000 | [diff] [blame] | 101 | steps: |
| 102 | - name: Checkout project |
| 103 | uses: actions/checkout@v3 |
| 104 | |
| 105 | - name: Install Poetry |
| 106 | run: pipx install poetry |
| 107 | |
| 108 | - name: Setup Python |
| 109 | uses: actions/setup-python@v4 |
| 110 | with: |
| 111 | cache: poetry |
| 112 | |
| 113 | - name: Install dependencies |
| 114 | run: poetry install --no-interaction --with dev |
| 115 | |
| 116 | # NOTE(mnaser): LVM commands take a long time if there are any existing |
| 117 | # loop devices created by "snapd", so we uninstall it. |
| 118 | - name: Uninstall "snapd" |
| 119 | run: sudo apt-get purge -y snapd |
| 120 | |
| 121 | - name: Turn off swap |
| 122 | run: sudo swapoff -a |
| 123 | |
| 124 | - name: Run Molecule Converge |
| 125 | run: poetry run molecule converge -s ceph |
| 126 | env: |
| 127 | OVN_ENABLED: true |
| 128 | |
| 129 | # Enable tmate debugging of manually-triggered workflows if the input option was provided |
| 130 | - name: Setup tmate session |
| 131 | if: ${{ failure() }} |
| 132 | uses: mxschmitt/action-tmate@v3 |
Mohammed Naser | b90fe5e | 2023-07-23 17:06:29 +0000 | [diff] [blame^] | 133 | timeout-minutes: 180 |
Mohammed Naser | 727b5b6 | 2023-07-22 19:21:00 +0000 | [diff] [blame] | 134 | |
| 135 | - name: Run Molecule Destroy |
| 136 | run: poetry run molecule destroy -s ceph |
| 137 | |
Mohammed Naser | 593ec01 | 2023-07-23 09:20:05 +0000 | [diff] [blame] | 138 | # ovn: |
| 139 | # runs-on: ubuntu-20.04-16-cores |
| 140 | # if: github.event_name != 'workflow_dispatch' || !inputs.debug_enabled |
| 141 | # steps: |
| 142 | # - name: Checkout project |
| 143 | # uses: actions/checkout@v3 |
Mohammed Naser | 3f96178 | 2023-04-20 10:48:21 -0400 | [diff] [blame] | 144 | |
Mohammed Naser | 593ec01 | 2023-07-23 09:20:05 +0000 | [diff] [blame] | 145 | # - name: Install Poetry |
| 146 | # run: pipx install poetry |
Mohammed Naser | 3f96178 | 2023-04-20 10:48:21 -0400 | [diff] [blame] | 147 | |
Mohammed Naser | 593ec01 | 2023-07-23 09:20:05 +0000 | [diff] [blame] | 148 | # - name: Setup Python |
| 149 | # uses: actions/setup-python@v4 |
| 150 | # with: |
| 151 | # cache: poetry |
Mohammed Naser | 3f96178 | 2023-04-20 10:48:21 -0400 | [diff] [blame] | 152 | |
Mohammed Naser | 593ec01 | 2023-07-23 09:20:05 +0000 | [diff] [blame] | 153 | # - name: Install dependencies |
| 154 | # run: poetry install --no-interaction --with dev |
Mohammed Naser | 3f96178 | 2023-04-20 10:48:21 -0400 | [diff] [blame] | 155 | |
Mohammed Naser | 593ec01 | 2023-07-23 09:20:05 +0000 | [diff] [blame] | 156 | # # NOTE(mnaser): LVM commands take a long time if there are any existing |
| 157 | # # loop devices created by "snapd", so we uninstall it. |
| 158 | # - name: Uninstall "snapd" |
| 159 | # run: sudo apt-get purge -y snapd |
Mohammed Naser | 3f96178 | 2023-04-20 10:48:21 -0400 | [diff] [blame] | 160 | |
Mohammed Naser | 593ec01 | 2023-07-23 09:20:05 +0000 | [diff] [blame] | 161 | # - name: Turn off swap |
| 162 | # run: sudo swapoff -a |
Mohammed Naser | 3f96178 | 2023-04-20 10:48:21 -0400 | [diff] [blame] | 163 | |
Mohammed Naser | 593ec01 | 2023-07-23 09:20:05 +0000 | [diff] [blame] | 164 | # - name: Run Molecule |
| 165 | # run: poetry run molecule test -s ceph |
| 166 | # env: |
| 167 | # OVN_ENABLED: true |