-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (80 loc) · 2.53 KB
/
ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# 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:
outputs:
artifact-prefix:
description: build_charm.yaml `artifact-prefix` output
value: ${{ jobs.build.outputs.artifact-prefix }}
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
# lib-check:
# name: Check libraries
# runs-on: ubuntu-22.04
# timeout-minutes: 5
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# with:
# fetch-depth: 0
# - run: |
# # Workaround for https://github.com/canonical/charmcraft/issues/1389#issuecomment-1880921728
# touch requirements.txt
# - name: Check libs
# uses: canonical/charming-actions/[email protected]
# with:
# charmcraft-channel: latest/beta/data-platform # TODO: remove after charmcraft 3.3 stable release
# credentials: ${{ secrets.CHARMHUB_TOKEN }}
# github-token: ${{ secrets.GITHUB_TOKEN }}
# use-labels: false
# fail-build: ${{ github.event_name == 'pull_request' }}
build:
name: Build charms
uses: canonical/data-platform-workflows/.github/workflows/[email protected]
with:
charmcraft-snap-channel: latest/beta/data-platform # TODO: remove after charmcraft 3.3 stable release
path-to-charm-directory: .
cache: false # TODO: change this to true once we are in charmcraftcache-hub
integration-test:
name: Integration test charm
needs:
- lint
- unit-test
- build
uses: canonical/data-platform-workflows/.github/workflows/[email protected]
with:
juju-agent-version: 3.6.1 # renovate: juju-agent-pin-minor
_beta_allure_report: true
artifact-prefix: ${{ needs.build.outputs.artifact-prefix }}
cloud: lxd
permissions:
contents: write