[DPE-6296] Add CI support + git ignore update #4
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: | |
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: . |