[DPE-9630] fix: safe pgdata symlink setup with accurate status reporting #5502
This file contains hidden or 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
| # Copyright 2022 Canonical Ltd. | |
| # See LICENSE file for licensing details. | |
| name: Tests | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| on: | |
| pull_request: | |
| paths-ignore: | |
| - '.gitignore' | |
| - '.jujuignore' | |
| - 'LICENSE' | |
| - '**.md' | |
| - .github/renovate.json5 | |
| - 'docs/**' | |
| - 'terraform/**' | |
| # Triggered on schedule by .github/workflows/scheduled_ci_*.yaml on default branch | |
| workflow_dispatch: | |
| # Triggered on push by .github/workflows/release.yaml | |
| workflow_call: | |
| outputs: | |
| artifact-prefix: | |
| description: build_charm.yaml `artifact-prefix` output | |
| value: ${{ jobs.build.outputs.artifact-prefix }} | |
| jobs: | |
| lint: | |
| name: Lint | |
| uses: canonical/data-platform-workflows/.github/workflows/lint.yaml@v42.0.1 | |
| permissions: {} | |
| unit-test: | |
| name: Unit test charm | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - 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 | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| permissions: {} | |
| alert-test: | |
| name: Test Prometheus Alert Rules | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v6 | |
| - name: Install prometheus snap | |
| run: sudo snap install prometheus | |
| - name: Check validity of prometheus alert rules | |
| run: promtool check rules src/prometheus_alert_rules/* | |
| - name: Run unit tests for prometheus alert rules | |
| run: promtool test rules tests/alerts/*.yaml | |
| permissions: {} | |
| build: | |
| name: Build charm | |
| uses: canonical/data-platform-workflows/.github/workflows/build_charm.yaml@v42.0.1 | |
| permissions: {} | |
| integration-test: | |
| name: Integration test charm | |
| 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 |