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 |
| 22 | |
| 23 | jobs: |
| 24 | test: |
| 25 | runs-on: ubuntu-20.04-16-cores |
| 26 | steps: |
| 27 | - name: Checkout project |
| 28 | uses: actions/checkout@v3 |
| 29 | |
| 30 | - name: Install Poetry |
| 31 | run: pipx install poetry |
| 32 | |
| 33 | - name: Setup Python |
| 34 | uses: actions/setup-python@v4 |
| 35 | with: |
| 36 | cache: poetry |
| 37 | |
| 38 | - name: Install dependencies |
| 39 | run: poetry install --no-interaction --with dev |
| 40 | |
| 41 | # NOTE(mnaser): LVM commands take a long time if there are any existing |
| 42 | # loop devices created by "snapd", so we uninstall it. |
| 43 | - name: Uninstall "snapd" |
| 44 | run: sudo apt-get purge -y snapd |
| 45 | |
| 46 | - name: Turn off swap |
| 47 | run: sudo swapoff -a |
| 48 | |
| 49 | - name: Run Molecule |
| 50 | run: poetry run molecule test -s ceph |