ci(unit-tests): don't cancel other tests when one fails #14
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: Observability Charm Tests | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
workflow_call: | ||
jobs: | ||
o11y-charm-tests: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- charm-repo: canonical/alertmanager-k8s-operator | ||
commit: c640a9ae31e942522911c1d351b3fea6de5165a8 # 2024-11-25T12:26:55Z | ||
- charm-repo: canonical/prometheus-k8s-operator | ||
commit: 6d22620a68c388095cde8c76bbf7256447918aec # rev217 2024-11-26T11:12:26Z | ||
disabled: true # Waiting for an upstream PR: https://github.com/canonical/prometheus-k8s-operator/pull/639 | ||
- charm-repo: canonical/grafana-k8s-operator | ||
commit: 5b6e32c7ab1e58c248c30265d2f5c474e2db755d # rev124 2024-11-26T12:06:49Z | ||
steps: | ||
- name: Checkout the ${{ matrix.charm-repo }} repository | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: ${{ matrix.charm-repo }} | ||
ref: ${{ matrix.commit }} | ||
- name: Update 'ops' dependency in test charm to latest | ||
run: | | ||
sed -i -e "/^ops[ ><=]/d" -e "/canonical\/operator/d" -e "/#egg=ops/d" requirements.txt | ||
echo -e "\ngit+$GITHUB_SERVER_URL/$GITHUB_REPOSITORY@$GITHUB_SHA#egg=ops" >> requirements.txt | ||
- name: Install dependencies | ||
run: pip install tox~=4.2 | ||
- name: Run the charm's unit tests | ||
if: !matrix.disabled | ||
run: tox -vve unit | ||
- name: Run the charm's static analysis checks | ||
if: !matrix.disabled | ||
run: tox -vve static-charm |