Skip to content

Commit

Permalink
ci: update charming-actions
Browse files Browse the repository at this point in the history
Talking to @taurus-forever about the recently merged change, I noticed that we didn't bump the actual upload action, and also that we weren't actually using the `charming-actions/channel` action.
  • Loading branch information
jnsgruk committed Oct 21, 2022
1 parent 5e6c73d commit 7c6f00d
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 27 deletions.
50 changes: 29 additions & 21 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@ name: Tests
on:
pull_request:
workflow_call:
secrets:
CHARMHUB_TOKEN:
required: true

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Install dependencies
run: python3 -m pip install tox
- name: Run linters
Expand All @@ -20,21 +23,36 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Install dependencies
run: python -m pip install tox
- name: Run tests
run: tox -e unit

lib-check:
name: Check libraries
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Check libs
uses: canonical/charming-actions/[email protected]
with:
credentials: "${{ secrets.CHARMHUB_TOKEN }}" # FIXME: current token will expire in 2023-07-04
github-token: "${{ secrets.GITHUB_TOKEN }}"

charm-integration-test-lxd:
name: Charm integration tests (lxd)
needs:
- lint
- unit-test
- lib-check
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Setup operator environment
uses: charmed-kubernetes/actions-operator@main
with:
Expand All @@ -47,10 +65,11 @@ jobs:
needs:
- lint
- unit-test
- lib-check
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Setup operator environment
uses: charmed-kubernetes/actions-operator@main
with:
Expand All @@ -63,10 +82,11 @@ jobs:
needs:
- lint
- unit-test
- lib-check
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Setup operator environment
uses: charmed-kubernetes/actions-operator@main
with:
Expand All @@ -79,10 +99,11 @@ jobs:
needs:
- lint
- unit-test
- lib-check
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Setup operator environment
uses: charmed-kubernetes/actions-operator@main
with:
Expand All @@ -95,27 +116,14 @@ jobs:
needs:
- lint
- unit-test
- lib-check
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Setup operator environment
uses: charmed-kubernetes/actions-operator@main
with:
provider: lxd
- name: Run tls integration tests
run: tox -e tls-integration

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/[email protected]
with:
credentials: "${{ secrets.CHARMHUB_TOKEN }}" # FIXME: current token will expire in 2023-07-04
github-token: "${{ secrets.GITHUB_TOKEN }}"
10 changes: 4 additions & 6 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,21 @@ on:
jobs:
ci-tests:
uses: ./.github/workflows/ci.yaml
secrets:
CHARMHUB_TOKEN: "${{ secrets.CHARMHUB_TOKEN }}"

release-to-charmhub:
name: Release to CharmHub
needs:
- lib-check
- ci-tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Select charmhub channel
uses: canonical/charming-actions/[email protected]
id: channel
- name: Upload charm to charmhub
uses: canonical/charming-actions/upload-charm@2.0.0-rc
uses: canonical/charming-actions/upload-charm@2.1.1
with:
credentials: "${{ secrets.CHARMHUB_TOKEN }}"
github-token: "${{ secrets.GITHUB_TOKEN }}"
Expand Down

0 comments on commit 7c6f00d

Please sign in to comment.