Skip to content

[DPE-8923] Migrate tests/integration/integration/{relations,roles} to Jubilant #4398

[DPE-8923] Migrate tests/integration/integration/{relations,roles} to Jubilant

[DPE-8923] Migrate tests/integration/integration/{relations,roles} to Jubilant #4398

Workflow file for this run

# Copyright 2022 Canonical Ltd.
# See LICENSE file for licensing details.
name: Pull request
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
pull_request:
paths-ignore:
- '**.md'
- '.github/renovate.json5'
- 'docs/**'
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Install terraform
run: |
sudo snap install terraform --classic
- name: Install tox & poetry
run: |
pipx install tox
pipx install poetry
- name: Run linters
run: |
tox run -e lint
tox run -e lint-terraform
unit-test:
name: Unit test charm
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Install tox & poetry
run: |
pipx install tox
pipx install poetry
- name: Run tests
run: tox run -e unit
- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v5
alert-test:
name: Test Prometheus Alert Rules
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout repo
uses: actions/checkout@v5
- name: Install prometheus snap
run: sudo snap install prometheus
- name: Check validity of prometheus alert rules
run: promtool check rules src/alert_rules/prometheus/*
- name: Run unit tests for prometheus alert rules
run: promtool test rules tests/alerts/*.yaml
build:
name: Build charm
uses: canonical/data-platform-workflows/.github/workflows/[email protected]
integration-test:
name: Integration tests
needs:
- lint
- unit-test
- build
uses: ./.github/workflows/integration_test.yaml
with:
artifact-prefix: ${{ needs.build.outputs.artifact-prefix }}
secrets: inherit
permissions:
contents: write # Needed for Allure Report