From 55ffdc60be69717203bf5c81e95a734b5c61d3ad Mon Sep 17 00:00:00 2001 From: Paulo Machado Date: Thu, 7 Jul 2022 17:20:10 -0300 Subject: [PATCH 1/4] removed workaround --- .github/workflows/ci.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 4ad336e12d..8de6715417 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -38,6 +38,5 @@ jobs: uses: charmed-kubernetes/actions-operator@main with: provider: lxd - lxd-channel: 4.24/stable # patch until https://bugs.launchpad.net/juju/+bug/1968849 is resolved - name: Run integration tests run: tox -e integration From b70e94174a65339d11bf1b3e808f0dcada0452da Mon Sep 17 00:00:00 2001 From: Paulo Machado Date: Thu, 7 Jul 2022 17:20:24 -0300 Subject: [PATCH 2/4] Auto release to charmhub --- .github/workflows/release.yaml | 79 ++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000000..4a60d36438 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,79 @@ +name: Release to latest/edge + +on: + push: + branches: + - main + +jobs: + lib-check: + name: Check libraries + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Check libs + uses: canonical/charming-actions/check-libraries@1.0.3 + with: + credentials: "${{ secrets.CHARMHUB_TOKEN }}" # FIXME: current token will expire in 2023-07-04 + github-token: "${{ secrets.GITHUB_TOKEN }}" + + lint: + name: Lint + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Install dependencies + run: python3 -m pip install tox + - name: Run linters + run: tox -e lint + + unit-test: + name: Unit tests + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Install dependencies + run: python -m pip install tox + - name: Run tests + run: tox -e unit + + integration-test-lxd: + name: Integration tests for (lxd) + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup operator environment + uses: charmed-kubernetes/actions-operator@main + with: + provider: lxd + - name: Run integration tests + run: tox -e integration + + release-to-charmhub: + name: Release to CharmHub + needs: + - lib-check + - lint + - unit-test + - integration-test-lxd + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Select charmhub channel + uses: canonical/charming-actions/channel@1.0.3 + id: channel + - name: Upload charm to charmhub + uses: canonical/charming-actions/upload-charm@1.0.3 + with: + credentials: "${{ secrets.CHARMHUB_TOKEN }}" + github-token: "${{ secrets.GITHUB_TOKEN }}" + channel: "${{ steps.channel.outputs.name }}" From 3b1613037254cf04cba2d5df3ef1579ef7dd1f07 Mon Sep 17 00:00:00 2001 From: Marcelo Henrique Neppel Date: Wed, 3 Aug 2022 19:22:02 -0300 Subject: [PATCH 3/4] Update Charmhub action --- .github/workflows/release.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 4a60d36438..80f700bba0 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -69,10 +69,10 @@ jobs: with: fetch-depth: 0 - name: Select charmhub channel - uses: canonical/charming-actions/channel@1.0.3 + uses: canonical/charming-actions/channel@2.0.0-rc id: channel - name: Upload charm to charmhub - uses: canonical/charming-actions/upload-charm@1.0.3 + uses: canonical/charming-actions/upload-charm@2.0.0-rc with: credentials: "${{ secrets.CHARMHUB_TOKEN }}" github-token: "${{ secrets.GITHUB_TOKEN }}" From 037d42ff14292e4413ff3e6d729ee45c5c19eca5 Mon Sep 17 00:00:00 2001 From: Marcelo Henrique Neppel Date: Wed, 3 Aug 2022 19:23:32 -0300 Subject: [PATCH 4/4] Change flake8 version to 4.0.1 --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index f933218941..844d34f0a2 100644 --- a/tox.ini +++ b/tox.ini @@ -35,7 +35,7 @@ commands = description = Check code against coding style standards deps = black - flake8 + flake8==4.0.1 flake8-docstrings flake8-copyright flake8-builtins