Tests #45
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 2025 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 | |
| - '.github/workflows/sync_docs.yaml' | |
| schedule: | |
| - cron: '53 0 * * *' # Daily at 00:53 UTC | |
| # Triggered on push to branch "main" by .github/workflows/release.yaml | |
| workflow_call: | |
| outputs: | |
| artifact-prefix: | |
| description: build_charm.yaml `artifact-prefix` output | |
| value: ${{ jobs.build.outputs.artifact-prefix }} | |
| permissions: {} | |
| jobs: | |
| # TODO install uv in reusable and re-enable | |
| # lint: | |
| # name: Lint | |
| # uses: canonical/data-platform-workflows/.github/workflows/[email protected] | |
| lint: | |
| name: tox run -e lint | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Install tox & uv | |
| run: | | |
| pipx install tox | |
| sudo snap install astral-uv --classic | |
| - name: Run linters | |
| run: tox run -e lint | |
| unit-test: | |
| name: Unit test charm | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Install tox & uv | |
| run: | | |
| pipx install tox | |
| sudo snap install astral-uv --classic | |
| - name: Run tests | |
| run: tox run -e unit | |
| - name: Upload Coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |