diff options
author | Benjamin Drung <bdrung@debian.org> | 2023-06-10 08:55:33 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-06-10 09:21:49 +0000 |
commit | 88837172f69eabc408ae3945d82e0270b8e07440 (patch) | |
tree | d6b7fa06694f45d25f54f6ea9ded93c981e51f6f /.github/workflows/docker-test.yml | |
parent | Initial commit. (diff) | |
download | nvme-stas-88837172f69eabc408ae3945d82e0270b8e07440.tar.xz nvme-stas-88837172f69eabc408ae3945d82e0270b8e07440.zip |
Adding upstream version 2.2.1.upstream/2.2.1
Signed-off-by: Benjamin Drung <bdrung@debian.org>
Diffstat (limited to '.github/workflows/docker-test.yml')
-rw-r--r-- | .github/workflows/docker-test.yml | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/.github/workflows/docker-test.yml b/.github/workflows/docker-test.yml new file mode 100644 index 0000000..92284c0 --- /dev/null +++ b/.github/workflows/docker-test.yml @@ -0,0 +1,51 @@ +name: Test + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + + workflow_dispatch: + +jobs: + docker-run: + if: ${{ !github.event.act }} # skip during local actions testing + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Install requirements + # make sure nvme-cli installed (we need it for /etc/nvme/hostnqn and /etc/nvme/hostid) + run: sudo apt-get install --yes --quiet nvme-cli + + - name: Load Kernel drivers + run: sudo modprobe -v nvme-fabrics + + - name: Fix D-BUS + run: | + sed 's/@STAFD_DBUS_NAME@/org.nvmexpress.staf/g' etc/dbus-1/system.d/org.nvmexpress.staf.in.conf | sudo tee /usr/share/dbus-1/system.d/org.nvmexpress.staf.conf + sed 's/@STACD_DBUS_NAME@/org.nvmexpress.stac/g' etc/dbus-1/system.d/org.nvmexpress.stac.in.conf | sudo tee /usr/share/dbus-1/system.d/org.nvmexpress.stac.conf + sudo systemctl reload dbus.service + + - name: Build & Start containers + run: docker-compose -f "docker-compose.yml" up --detach --build + + - name: Run tests + run: | + docker-compose ps + docker-compose exec -T stafd stafctl ls + docker-compose exec -T stafd stafctl status + docker-compose exec -T stacd stacctl ls + docker-compose exec -T stacd stacctl status + docker-compose logs + + - name: Logs + if: failure() + run: | + docker-compose ps || true + docker-compose logs || true + + - name: Stop containers + if: always() + run: docker-compose -f "docker-compose.yml" down |