From 0b88ec5b2f4cd4cb34702e283e1609859bd5163d Mon Sep 17 00:00:00 2001 From: Sandor Zeestraten Date: Tue, 10 Dec 2019 15:14:33 +0100 Subject: [PATCH 1/8] Add bundle test to ci --- .github/workflows/ci.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f315a0b..d5e7fbd 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -62,3 +62,5 @@ jobs: run: | sudo snap install juju --classic --channel=${{ matrix.juju_channel }} sudo su $(whoami) -c 'juju bootstrap localhost --no-gui' + - name: Run tests + run: make test-${{ test_bundles }} From 0e34f9d281cecc705f5c212239ac28a7c62dc10c Mon Sep 17 00:00:00 2001 From: Sandor Zeestraten Date: Tue, 10 Dec 2019 15:16:45 +0100 Subject: [PATCH 2/8] Fix typo in github action yam --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d5e7fbd..813fb1b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -63,4 +63,4 @@ jobs: sudo snap install juju --classic --channel=${{ matrix.juju_channel }} sudo su $(whoami) -c 'juju bootstrap localhost --no-gui' - name: Run tests - run: make test-${{ test_bundles }} + run: make test-${{ matrix.test_bundles }} From 3c221688b0111993689892bdad7d20091b2e1952 Mon Sep 17 00:00:00 2001 From: Sandor Zeestraten Date: Wed, 8 Jan 2020 10:29:39 +0100 Subject: [PATCH 3/8] Change ci test python version to 3.6.x --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f11e23a..199712f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -48,7 +48,7 @@ jobs: - uses: actions/checkout@v1 - uses: actions/setup-python@v1 with: - python-version: '3.7.x' + python-version: '3.6.x' - run: pip install tox - name: Download charm artifact uses: actions/download-artifact@v1 From 2d41079b23ff111c9a035fe881da2bf8225f39de Mon Sep 17 00:00:00 2001 From: Sandor Zeestraten Date: Wed, 8 Jan 2020 15:44:34 +0100 Subject: [PATCH 4/8] Add jujuna timeout and dump debug-log on failure --- .github/workflows/ci.yaml | 3 +++ tox.ini | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 199712f..19192fa 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -69,3 +69,6 @@ jobs: sudo su $(whoami) -c 'juju bootstrap localhost --no-gui' - name: Run tests run: make test-${{ matrix.test_bundles }} + - name: Display juju debug log on failure + run: juju debug-log + if: failure() diff --git a/tox.ini b/tox.ini index 72a90d5..b677333 100644 --- a/tox.ini +++ b/tox.ini @@ -17,11 +17,11 @@ commands = charm-build --report --no-local-layers --force --log-level INFO [testenv:test-xenial] deps = jujuna -commands = jujuna deploy --wait tests/bundles/xenial.yaml +commands = jujuna deploy --wait --timeout 600 tests/bundles/xenial.yaml [testenv:test-bionic] deps = jujuna -commands = jujuna deploy --wait tests/bundles/bionic.yaml +commands = jujuna deploy --wait --timeout 600 tests/bundles/bionic.yaml [isort] force_single_line = True From 87b775df52547fe716ba4cae46bc574dfbff6eef Mon Sep 17 00:00:00 2001 From: Sandor Zeestraten Date: Wed, 8 Jan 2020 16:15:00 +0100 Subject: [PATCH 5/8] Revert to Python 3.7.x and increase debug-log lines --- .github/workflows/ci.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 19192fa..6cb3f03 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -48,7 +48,7 @@ jobs: - uses: actions/checkout@v1 - uses: actions/setup-python@v1 with: - python-version: '3.6.x' + python-version: '3.7.x' - run: pip install tox - name: Download charm artifact uses: actions/download-artifact@v1 @@ -70,5 +70,5 @@ jobs: - name: Run tests run: make test-${{ matrix.test_bundles }} - name: Display juju debug log on failure - run: juju debug-log + run: juju debug-log --lines 100 if: failure() From 78ab42c35be30dd3d14b586a2ea0f40172878053 Mon Sep 17 00:00:00 2001 From: Sandor Zeestraten Date: Wed, 8 Jan 2020 16:45:26 +0100 Subject: [PATCH 6/8] Test to get file info on charm --- .github/workflows/ci.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 6cb3f03..ca551c4 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -25,6 +25,7 @@ jobs: - run: pip install tox - name: Build charm run: make build + - run: ls -la -R /tmp/charm-builds/megaraid-check/ - name: Upload charm artifact uses: actions/upload-artifact@v1 with: @@ -55,6 +56,7 @@ jobs: with: name: charm path: /tmp/charm-builds/megaraid-check + - run: ls -la -R /tmp/charm-builds/megaraid-check/ - name: Set up LXD run: | sudo usermod --append --groups lxd $(whoami) From d78fdde980d43b45752a1dcd8cfbdbd544ec67d2 Mon Sep 17 00:00:00 2001 From: Sandor Zeestraten Date: Thu, 9 Jan 2020 13:51:15 +0100 Subject: [PATCH 7/8] Add permissions workaround See https://github.com/actions/upload-artifact/issues/38 for upstream issue --- .github/workflows/ci.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ca551c4..13f221e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -25,7 +25,6 @@ jobs: - run: pip install tox - name: Build charm run: make build - - run: ls -la -R /tmp/charm-builds/megaraid-check/ - name: Upload charm artifact uses: actions/upload-artifact@v1 with: @@ -56,6 +55,9 @@ jobs: with: name: charm path: /tmp/charm-builds/megaraid-check + # Workarounds for https://github.com/actions/upload-artifact/issues/38 + - run: chmod +x -R /tmp/charm-builds/megaraid-check/bin + - run: chmod +x -R /tmp/charm-builds/megaraid-check/hooks - run: ls -la -R /tmp/charm-builds/megaraid-check/ - name: Set up LXD run: | From 3eb61843ef38ccd3df5386e102f67594afa060fb Mon Sep 17 00:00:00 2001 From: Sandor Zeestraten Date: Thu, 9 Jan 2020 14:04:57 +0100 Subject: [PATCH 8/8] Remove juju 2.4 and fix linting --- .github/workflows/ci.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 13f221e..1cbb8cb 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -37,7 +37,6 @@ jobs: fail-fast: false matrix: juju_channel: - - 2.4/stable - 2.5/stable - 2.6/stable - 2.7/stable @@ -56,7 +55,7 @@ jobs: name: charm path: /tmp/charm-builds/megaraid-check # Workarounds for https://github.com/actions/upload-artifact/issues/38 - - run: chmod +x -R /tmp/charm-builds/megaraid-check/bin + - run: chmod +x -R /tmp/charm-builds/megaraid-check/bin - run: chmod +x -R /tmp/charm-builds/megaraid-check/hooks - run: ls -la -R /tmp/charm-builds/megaraid-check/ - name: Set up LXD