Redirect the issue sync (do not merge) #183
Workflow file for this 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
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' |