Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
79 changes: 79 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -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@2.0.0-rc
id: channel
- name: Upload charm to charmhub
uses: canonical/charming-actions/upload-charm@2.0.0-rc
with:
credentials: "${{ secrets.CHARMHUB_TOKEN }}"
github-token: "${{ secrets.GITHUB_TOKEN }}"
channel: "${{ steps.channel.outputs.name }}"