22
22
jobs :
23
23
lint :
24
24
name : Lint
25
- uses : canonical/data-platform-workflows/.github/workflows/lint.yaml@v5.1 .2
25
+ uses : canonical/data-platform-workflows/.github/workflows/lint.yaml@v6.3 .2
26
26
27
27
unit-test :
28
28
name : Unit test charm
@@ -42,100 +42,35 @@ jobs:
42
42
43
43
build :
44
44
name : Build charm
45
- uses : canonical/data-platform-workflows/.github/workflows/build_charms_with_cache.yaml@v5.1 .2
45
+ uses : canonical/data-platform-workflows/.github/workflows/build_charms_with_cache.yaml@v6.3 .2
46
46
permissions :
47
47
actions : write # Needed to manage GitHub Actions cache
48
48
49
- gh-hosted-integration-test :
49
+
50
+ integration-test :
50
51
strategy :
51
52
fail-fast : false
52
53
matrix :
53
- tox-environment :
54
- - backup-integration
55
- - charm-integration
56
- - database-relation-integration
57
- - db-relation-integration
58
- - db-admin-relation-integration
59
- - ha-replication-integration
60
- - ha-self-healing-integration
61
- - ha-restore-cluster-integration
62
- - password-rotation-integration
63
- - plugins-integration
64
- - tls-integration
65
- - upgrade-integration
66
- - upgrade-from-stable-integration
67
- juju-snap-channel : ["2.9/stable", "3.1/stable"]
68
- exclude :
69
- # Admin tests need landscape on juju 2
70
- - tox-environment : db-admin-relation-integration
71
- juju-snap-channel : " 3.1/stable"
72
- include :
73
- - juju-snap-channel : " 3.1/stable"
74
- agent-version : " 3.1.6"
75
- libjuju-version : " 3.2.2"
76
- exclude-mark : " juju2"
77
- - juju-snap-channel : " 2.9/stable"
78
- agent-version : " 2.9.45"
79
- libjuju-version : " 2.9.45.0"
80
- exclude-mark : " juju3"
81
- name : ${{ matrix.juju-snap-channel }} - (GH hosted) ${{ matrix.tox-environment }}
54
+ juju :
55
+ - agent : 2.9.45
56
+ libjuju : ^2
57
+ - agent : 3.1.6
58
+ name : Integration test charm | ${{ matrix.juju.agent }}
82
59
needs :
83
60
- lint
84
61
- unit-test
85
62
- build
86
- runs-on : ubuntu-latest
87
- timeout-minutes : 120
88
- steps :
89
- - name : Checkout
90
- uses : actions/checkout@v4
91
- - name : Install tox & poetry
92
- run : |
93
- pipx install tox
94
- pipx install poetry
95
- - name : Free up disk space
96
- run : |
97
- # From https://github.com/actions/runner-images/issues/2840#issuecomment-790492173
98
- sudo rm -rf /usr/share/dotnet
99
- sudo rm -rf /opt/ghc
100
- sudo rm -rf /usr/local/share/boost
101
- sudo rm -rf "$AGENT_TOOLSDIRECTORY"
102
- - name : Setup operator environment
103
- uses : charmed-kubernetes/actions-operator@main
104
- with :
105
- provider : lxd
106
- bootstrap-options : " --agent-version ${{ matrix.agent-version }}"
107
- juju-channel : ${{ matrix.juju-snap-channel }}
108
- - name : Update python-libjuju version
109
- if : ${{ matrix.juju-snap-channel == '2.9/stable' }}
110
- run : poetry add --lock --group integration juju@'${{ matrix.libjuju-version }}'
111
- - name : Download packed charm(s)
112
- uses : actions/download-artifact@v3
113
- with :
114
- name : ${{ needs.build.outputs.artifact-name }}
115
- - name : Select test stability level
116
- id : select-test-stability
117
- run : |
118
- if [[ "${{ github.event_name }}" == "schedule" ]]
119
- then
120
- echo Running unstable and stable tests
121
- echo "mark_expression=" >> "$GITHUB_OUTPUT"
122
- else
123
- echo Skipping unstable tests
124
- echo "mark_expression=and not unstable" >> "$GITHUB_OUTPUT"
125
- fi
126
- - name : Select test secret usage
127
- id : select-test-secrets
128
- if : ${{ github.event.pull_request.head.repo.full_name != 'canonical/postgresql-operator' }}
129
- run : |
130
- echo Skipping tests using secrets
131
- echo "mark_secrets=and not uses_secrets" >> "$GITHUB_OUTPUT"
132
- - name : Run integration tests
133
- run : tox run -e ${{ matrix.tox-environment }} -- -m 'not ${{ matrix.exclude-mark }} ${{ steps.select-test-secrets.outputs.mark_secrets }} ${{ steps.select-test-stability.outputs.mark_expression }}' --keep-models
134
- env :
135
- SECRETS_FROM_GITHUB : |
136
- {
137
- "AWS_ACCESS_KEY": "${{ secrets.AWS_ACCESS_KEY }}",
138
- "AWS_SECRET_KEY": "${{ secrets.AWS_SECRET_KEY }}",
139
- "GCP_ACCESS_KEY": "${{ secrets.GCP_ACCESS_KEY }}",
140
- "GCP_SECRET_KEY": "${{ secrets.GCP_SECRET_KEY }}",
141
- }
63
+ uses : canonical/data-platform-workflows/.github/workflows/integration_test_charm_self_hosted.yaml@v6.3.2
64
+ with :
65
+ artifact-name : ${{ needs.build.outputs.artifact-name }}
66
+ cloud : lxd
67
+ juju-agent-version : ${{ matrix.juju.agent }}
68
+ libjuju-version-constraint : ${{ matrix.juju.libjuju }}
69
+ secrets :
70
+ integration-test : |
71
+ {
72
+ "AWS_ACCESS_KEY": "${{ secrets.AWS_ACCESS_KEY }}",
73
+ "AWS_SECRET_KEY": "${{ secrets.AWS_SECRET_KEY }}",
74
+ "GCP_ACCESS_KEY": "${{ secrets.GCP_ACCESS_KEY }}",
75
+ "GCP_SECRET_KEY": "${{ secrets.GCP_SECRET_KEY }}",
76
+ }
0 commit comments