-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MISC] update data-platform-workflows (#19)
* Initial borked test * Integration test * Bump libs and actions
- Loading branch information
Showing
13 changed files
with
1,860 additions
and
302 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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"$schema": "https://docs.renovatebot.com/renovate-schema.json", | ||
"extends": ["github>canonical/data-platform//renovate_presets/charm.json5"], | ||
"reviewers": ["dragomirp", "marceloneppel", "taurus-forever"], | ||
"packageRules": [ | ||
// Later rules override earlier rules | ||
], | ||
"regexManagers": [ | ||
{ | ||
"fileMatch": ["(^|/)([\\w-]*)charmcraft\\.ya?ml$"], | ||
"matchStrings": ["- (?<depName>.*?)(?:\\[.*?\\])?==(?<currentValue>.*?) +# renovate"], | ||
"datasourceTemplate": "pypi", | ||
"versioningTemplate": "loose" | ||
} | ||
] | ||
} |
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 |
---|---|---|
|
@@ -20,28 +20,119 @@ on: | |
jobs: | ||
lint: | ||
name: Lint | ||
uses: canonical/data-platform-workflows/.github/workflows/[email protected] | ||
|
||
build: | ||
name: Build charm | ||
uses: canonical/data-platform-workflows/.github/workflows/[email protected] | ||
permissions: | ||
actions: write # Needed to manage GitHub Actions cache | ||
|
||
gh-hosted-integration-k8s-test: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
tox-environment: | ||
- integration-k8s-smoke | ||
juju-snap-channel: ["2.9/stable", "3.1/stable"] | ||
include: | ||
- juju-snap-channel: "3.1/stable" | ||
agent-version: "3.1.6" | ||
libjuju-version: "3.2.2" | ||
- juju-snap-channel: "2.9/stable" | ||
agent-version: "2.9.45" | ||
libjuju-version: "2.9.45.0" | ||
name: ${{ matrix.juju-snap-channel }} - (GH hosted) ${{ matrix.tox-environment }} | ||
needs: | ||
- lint | ||
- build | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
timeout-minutes: 120 | ||
steps: | ||
- name: Checkout | ||
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 | ||
- name: Run linters | ||
run: tox run -e lint | ||
- name: Install tox & poetry | ||
run: | | ||
pipx install tox | ||
pipx install poetry | ||
- name: Setup operator environment | ||
uses: charmed-kubernetes/actions-operator@main | ||
with: | ||
provider: microk8s | ||
channel: "1.28-strict/stable" | ||
bootstrap-options: "--agent-version ${{ matrix.agent-version }}" | ||
juju-channel: ${{ matrix.juju-snap-channel }} | ||
- name: Update python-libjuju version | ||
if: ${{ matrix.juju-snap-channel == '2.9/stable' }} | ||
run: poetry add --lock --group integration juju@'${{ matrix.libjuju-version }}' | ||
- name: Download packed charm(s) | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: ${{ needs.build.outputs.artifact-name }} | ||
- name: Select test stability level | ||
id: select-test-stability | ||
run: | | ||
if [[ "${{ github.event_name }}" == "schedule" ]] | ||
then | ||
echo Running unstable and stable tests | ||
echo "mark_expression=" >> "$GITHUB_OUTPUT" | ||
else | ||
echo Skipping unstable tests | ||
echo "mark_expression=not unstable" >> "$GITHUB_OUTPUT" | ||
fi | ||
- name: Run integration tests | ||
run: tox run -e ${{ matrix.tox-environment }} -- -m '${{ steps.select-test-stability.outputs.mark_expression }}' --keep-models | ||
|
||
lib-check: | ||
name: Check libraries | ||
gh-hosted-integration-lxd-test: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
tox-environment: | ||
- integration-lxd-smoke | ||
juju-snap-channel: ["2.9/stable", "3.1/stable"] | ||
include: | ||
- juju-snap-channel: "3.1/stable" | ||
agent-version: "3.1.6" | ||
libjuju-version: "3.2.2" | ||
- juju-snap-channel: "2.9/stable" | ||
agent-version: "2.9.45" | ||
libjuju-version: "2.9.45.0" | ||
name: ${{ matrix.juju-snap-channel }} - (GH hosted) ${{ matrix.tox-environment }} | ||
needs: | ||
- lint | ||
- build | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
timeout-minutes: 120 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Install tox & poetry | ||
run: | | ||
pipx install tox | ||
pipx install poetry | ||
- name: Setup operator environment | ||
uses: charmed-kubernetes/actions-operator@main | ||
with: | ||
fetch-depth: 0 | ||
- name: Check libs | ||
uses: canonical/charming-actions/[email protected] | ||
provider: lxd | ||
bootstrap-options: "--agent-version ${{ matrix.agent-version }}" | ||
juju-channel: ${{ matrix.juju-snap-channel }} | ||
- name: Update python-libjuju version | ||
if: ${{ matrix.juju-snap-channel == '2.9/stable' }} | ||
run: poetry add --lock --group integration juju@'${{ matrix.libjuju-version }}' | ||
- name: Download packed charm(s) | ||
uses: actions/download-artifact@v3 | ||
with: | ||
credentials: "${{ secrets.CHARMHUB_TOKEN }}" | ||
github-token: "${{ secrets.GITHUB_TOKEN }}" | ||
name: ${{ needs.build.outputs.artifact-name }} | ||
- name: Select test stability level | ||
id: select-test-stability | ||
run: | | ||
if [[ "${{ github.event_name }}" == "schedule" ]] | ||
then | ||
echo Running unstable and stable tests | ||
echo "mark_expression=" >> "$GITHUB_OUTPUT" | ||
else | ||
echo Skipping unstable tests | ||
echo "mark_expression=not unstable" >> "$GITHUB_OUTPUT" | ||
fi | ||
- name: Run integration tests | ||
run: tox run -e ${{ matrix.tox-environment }} -- -m '${{ steps.select-test-stability.outputs.mark_expression }}' --keep-models |
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Copyright 2022 Canonical Ltd. | ||
# See LICENSE file for licensing details. | ||
name: Check libs | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
on: | ||
pull_request: | ||
paths-ignore: | ||
- '.gitignore' | ||
- '.jujuignore' | ||
- 'LICENSE' | ||
- '**.md' | ||
- 'renovate.json' | ||
|
||
jobs: | ||
lib-check: | ||
name: Check libraries | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
if: ${{ github.event.pull_request.head.repo.full_name == 'canonical/postgresql-test-app' }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Check libs | ||
uses: canonical/charming-actions/[email protected] | ||
with: | ||
credentials: "${{ secrets.CHARMHUB_TOKEN }}" | ||
github-token: "${{ secrets.GITHUB_TOKEN }}" | ||
|
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
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
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
Oops, something went wrong.