[DPE-6296] Pyright fixes + structured_config
additions + break down of actions.py
#9
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
# 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: | |
schedule: | |
- cron: "53 0 * * *" # Daily at 00:53 UTC | |
# Triggered on push to branch "main" by .github/workflows/release.yaml | |
workflow_call: | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install tox | |
run: pipx install tox | |
- name: Run linters | |
run: tox run -e lint | |
unit-test: | |
name: Unit tests | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install tox | |
run: pipx install tox | |
- name: Run tests | |
run: tox run -e unit | |
sync-docs: | |
if: ${{ github.event_name != 'pull_request' || startsWith(github.event.pull_request.head.repo.full_name, 'canonical/') }} | |
uses: ./.github/workflows/sync_docs.yaml | |
secrets: inherit | |
permissions: | |
contents: write # Needed to update tags | |
pull-requests: write # Need to create PR | |
build: | |
name: Build charms | |
uses: canonical/data-platform-workflows/.github/workflows/[email protected] | |
with: | |
cache: true | |
charmcraft-snap-channel: latest/beta/data-platform # TODO: remove after charmcraft 3.3 stable release | |
path-to-charm-directory: . |