generated from canonical/template-operator
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DPE-5612] Update shared workflows version (#255)
- Loading branch information
Showing
7 changed files
with
586 additions
and
501 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,34 +9,32 @@ concurrency: | |
on: | ||
pull_request: | ||
schedule: | ||
- cron: '53 0 * * *' # Daily at 00:53 UTC | ||
- cron: "53 0 * * *" # Daily at 00:53 UTC | ||
# Triggered on push to branch "main" by .github/workflows/release.yaml | ||
workflow_call: | ||
|
||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-22.04 | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
- name: Install tox | ||
# TODO: Consider replacing with custom image on self-hosted runner OR pinning version | ||
run: python3 -m pip install tox | ||
run: pipx install tox | ||
- name: Run linters | ||
run: tox run -e lint | ||
|
||
unit-test: | ||
name: Unit tests | ||
runs-on: ubuntu-22.04 | ||
timeout-minutes: 5 | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
- name: Install tox | ||
# TODO: Consider replacing with custom image on self-hosted runner OR pinning version | ||
run: python3 -m pip install tox | ||
run: pipx install tox | ||
- name: Run tests | ||
run: tox run -e unit | ||
|
||
|
@@ -45,12 +43,20 @@ jobs: | |
uses: ./.github/workflows/sync_docs.yaml | ||
secrets: inherit | ||
permissions: | ||
contents: write # Needed to update tags | ||
contents: write # Needed to update tags | ||
pull-requests: write # Need to create PR | ||
|
||
build: | ||
name: Build charms | ||
uses: canonical/data-platform-workflows/.github/workflows/build_charms_with_cache.yaml@v7 | ||
uses: canonical/data-platform-workflows/.github/workflows/[email protected] | ||
with: | ||
cache: true | ||
path-to-charm-directory: ${{ matrix.path }} | ||
strategy: | ||
matrix: | ||
path: | ||
- . | ||
- tests/integration/app-charm | ||
|
||
integration-test: | ||
strategy: | ||
|
@@ -74,18 +80,18 @@ jobs: | |
timeout-minutes: 240 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
- name: Setup operator environment | ||
# TODO: Replace with custom image on self-hosted runner | ||
uses: charmed-kubernetes/actions-operator@main | ||
with: | ||
provider: lxd | ||
juju-channel: 3.4/stable | ||
bootstrap-options: "--agent-version 3.4.2" | ||
- name: Download packed charm(s) | ||
uses: actions/download-artifact@v3 | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: ${{ needs.build.outputs.artifact-name }} | ||
pattern: packed-charm-cache-true-* | ||
merge-multiple: true | ||
- name: Select tests | ||
id: select-tests | ||
run: | | ||
|
@@ -118,18 +124,18 @@ jobs: | |
timeout-minutes: 120 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
- name: Setup operator environment | ||
# TODO: Replace with custom image on self-hosted runner | ||
uses: charmed-kubernetes/actions-operator@main | ||
with: | ||
provider: lxd | ||
juju-channel: 3.4/stable | ||
bootstrap-options: "--agent-version 3.4.2" | ||
- name: Download packed charm(s) | ||
uses: actions/download-artifact@v3 | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: ${{ needs.build.outputs.artifact-name }} | ||
pattern: packed-charm-cache-true-* | ||
merge-multiple: true | ||
- name: Select tests | ||
id: select-tests | ||
run: | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,11 +10,11 @@ on: | |
jobs: | ||
lib-check: | ||
name: Check libraries | ||
runs-on: ubuntu-22.04 | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Check libs | ||
|
@@ -29,25 +29,27 @@ jobs: | |
uses: ./.github/workflows/ci.yaml | ||
secrets: inherit | ||
permissions: | ||
contents: write # Needed to login to Discourse | ||
contents: write # Needed to login to Discourse | ||
pull-requests: write # Need to create PR | ||
actions: write | ||
|
||
build: | ||
name: Build charm | ||
uses: canonical/data-platform-workflows/.github/workflows/build_charm_without_cache.yaml@v7 | ||
uses: canonical/data-platform-workflows/.github/workflows/[email protected] | ||
with: | ||
cache: false | ||
|
||
release: | ||
name: Release to Charmhub | ||
needs: | ||
- lib-check | ||
- ci-tests | ||
- build | ||
uses: canonical/data-platform-workflows/.github/workflows/release_charm.yaml@v7 | ||
uses: canonical/data-platform-workflows/.github/workflows/release_charm.yaml@v22.0.0 | ||
with: | ||
channel: 3/edge | ||
artifact-name: ${{ needs.build.outputs.artifact-name }} | ||
artifact-prefix: ${{ needs.build.outputs.artifact-prefix }} | ||
secrets: | ||
charmhub-token: ${{ secrets.CHARMHUB_TOKEN }} | ||
permissions: | ||
contents: write # Needed to create GitHub release | ||
contents: write # Needed to create GitHub release |
Oops, something went wrong.