Skip to content

Commit

Permalink
ci: rewrite actions to the new monorepo
Browse files Browse the repository at this point in the history
  • Loading branch information
jedel1043 committed Jan 14, 2025
1 parent d667768 commit 79e803f
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 8 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
- name: Install Charmcraft
run: sudo snap install charmcraft --classic --channel latest/stable
- name: Run linters
run: just lint
run: just repository lint

unit-test:
name: Unit tests
Expand All @@ -71,9 +71,9 @@ jobs:
- name: Install Charmcraft
run: sudo snap install charmcraft --classic --channel latest/stable
- name: Run unit tests
run: just unit
run: just repository unit

type-check:
typecheck:
name: Static type checking
runs-on: ubuntu-24.04
steps:
Expand All @@ -90,7 +90,7 @@ jobs:
- name: Install Charmcraft
run: sudo snap install charmcraft --classic --channel latest/stable
- name: Run tests
run: just typecheck
run: just repository typecheck

integration-test:
name: Integration tests (LXD)
Expand All @@ -99,7 +99,7 @@ jobs:
- inclusive-naming-check
- lint
- unit-test
- type-check
- typecheck
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -117,4 +117,4 @@ jobs:
provider: lxd
juju-channel: 3.4/stable
- name: Run tests
run: just integration
run: just repository integration
28 changes: 26 additions & 2 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,48 @@ jobs:
uses: ./.github/workflows/ci.yaml

release-to-charmhub:
name: Release filesystem-client to Charmhub
name: Release to Charmhub
needs:
- ci-tests
runs-on: ubuntu-24.04
strategy:
fail-fast: true
matrix:
charm: [filesystem-client, cephfs-server-proxy, nfs-server-proxy]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Select charmhub channel
- name: Select Charmhub channel
uses: canonical/charming-actions/[email protected]
id: channel
- name: Install Just
uses: extractions/setup-just@v2
with:
just-version: 1.38.0
- name: Install uv
uses: astral-sh/setup-uv@v4
with:
version: "0.5.8"
- name: Install Charmcraft
run: sudo snap install charmcraft --classic --channel latest/stable
- name: Stage charm
run: just repository stage ${{ matrix.charm }} --clean
- name: Setup LXD
uses: canonical/[email protected]
with:
channel: 5.21/stable
- name: Release updated libraries to Charmhub
uses: canonical/charming-actions/[email protected]
with:
credentials: "${{ secrets.CHARMCRAFT_AUTH }}"
github-token: "${{ secrets.GITHUB_TOKEN }}"
charm-path: "./_build/${{ matrix.charm }}"
- name: Upload charm to Charmhub
uses: canonical/charming-actions/[email protected]
with:
credentials: "${{ secrets.CHARMCRAFT_AUTH }}"
github-token: "${{ secrets.GITHUB_TOKEN }}"
channel: "${{ steps.channel.outputs.name }}"
charm-path: "./_build/${{ matrix.charm }}"
tag-prefix: "${{ matrix.charm }}"
destructive-mode: false

0 comments on commit 79e803f

Please sign in to comment.