-
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.
* add CI to validate cosl against worker and coordinator (tempo only for now) * silenced debug databag log if empty --------- Co-authored-by: michael <michael.dmitry98@gmail.com>
- Loading branch information
1 parent
aad960e
commit d52a372
Showing
6 changed files
with
94 additions
and
4 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,73 @@ | ||
name: Distributed Solutions Tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
workflow_call: | ||
|
||
jobs: | ||
test-distributed-charms: | ||
runs-on: ubuntu-latest | ||
continue-on-error: true | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- repo: canonical/tempo-coordinator-k8s-operator | ||
- repo: canonical/tempo-worker-k8s-operator | ||
|
||
steps: | ||
- name: Checkout the ${{ matrix.repo }} repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
repository: ${{ matrix.repo }} | ||
ref: main | ||
|
||
- name: Update 'cosl' dependency in test charm to this branch | ||
run: | | ||
sed -i -e "/^cosl[ ><=]/d" -e "/canonical\/cos-lib/d" -e "/#egg=cosl/d" requirements.txt | ||
echo -e "\ngit+$GITHUB_SERVER_URL/$GITHUB_REPOSITORY@${{ github.head_ref || github.ref_name }}#egg=cosl" >> requirements.txt | ||
- name: Install dependencies (tox & yq) | ||
run: pip install tox~=4.2 && sudo snap install yq | ||
|
||
- name: Add charmcraft build dependencies (git) | ||
run: yq e '.parts.charm.build-packages += ["git"]' -i charmcraft.yaml | ||
|
||
- name: Run the charm's unit & scenario tests | ||
id: unit | ||
run: tox -e unit,scenario | ||
|
||
- name: Run the charm's static analysis checks | ||
id: static | ||
run: tox -e static-charm,static-lib | ||
|
||
- name: Setup Charmcraft's pip cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: /home/runner/snap/charmcraft/common/cache/charmcraft/ | ||
key: charmcraft-cache-${{ github.job }}-${{ strategy.job-index }}-${{ github.run_id }}-${{ github.run_attempt }} | ||
restore-keys: charmcraft-cache | ||
|
||
- name: Get IP range | ||
id: ip_range | ||
run: | | ||
echo "ip_range=$(ip -4 -j route get 2.2.2.2 | jq -r '.[] | .prefsrc')/32" >> $GITHUB_OUTPUT | ||
- name: Setup operator environment (k8s) | ||
uses: charmed-kubernetes/actions-operator@main | ||
with: | ||
juju-channel: 3.4/stable | ||
provider: microk8s | ||
channel: 1.26-strict/stable | ||
microk8s-group: snap_microk8s | ||
microk8s-addons: "hostpath-storage dns metallb:${{ steps.ip_range.outputs.ip_range }}" | ||
charmcraft-channel: "2.x/stable" | ||
|
||
- name: Run the charm's integration tests | ||
run: tox -vve integration | ||
if: steps.unit.outcome == 'success' && steps.static.outcome == 'success' |
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
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