-
Notifications
You must be signed in to change notification settings - Fork 7
79 lines (76 loc) · 2.17 KB
/
charm-test.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
name: Charm Test
on:
workflow_call:
workflow_dispatch:
pull_request:
paths:
- charms/**
jobs:
charm-build:
uses: ./.github/workflows/charm-build.yaml
lint:
# Delete this if statement once charms are updated and include tox.
if: ${{ 1 }} == ${{ 2 }}
name: Lint
runs-on: ubuntu-latest
strategy:
matrix:
charm-type: ["jimm","jimm-k8s"]
defaults:
run:
working-directory: ./charms/${{ matrix.charm-type }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install dependencies
run: python3 -m pip install tox
- name: Run linters
run: tox -e lint
unit-tests:
# Delete this if statement once charms are updated and include tox.
if: ${{ 1 }} == ${{ 2 }}
name: Unit tests
runs-on: ubuntu-latest
strategy:
matrix:
charm-type: ["jimm","jimm-k8s"]
defaults:
run:
working-directory: ./charms/${{ matrix.charm-type }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install dependencies
run: python -m pip install tox
- name: Run tests
run: tox -e unit
# TODO(Kian): Fix this
# integration-tests:
# name: Integration tests
# needs:
# - charm-build
# runs-on: ubuntu-latest
# env:
# charm-type: "jimm-k8s"
# steps:
# - name: Checkout
# uses: actions/checkout@v3
# - name: Setup operator environment
# uses: charmed-kubernetes/actions-operator@main
# with:
# juju-channel: 2.9/stable
# provider: microk8s
# microk8s-addons: "ingress storage dns rbac registry"
# channel: 1.27/stable
# # Download the charm from the build to speed up integration tests.
# - uses: actions/download-artifact@master
# with:
# name: jimm-k8s-charm
# path: ./charms/${{ env.charm-type }}
# - name: Create OCI Image
# run: make push-microk8s
# - name: Install tox
# run: python -m pip install tox
# - name: Integration tests
# run: tox -e integration -- --localCharm
# working-directory: ./charms/${{ env.charm-type }}