Skip to content

Commit a47a1cc

Browse files
Update to data-platform-workflows v9.0.0 (#180)
1 parent 792434c commit a47a1cc

File tree

8 files changed

+26
-27
lines changed

8 files changed

+26
-27
lines changed

.github/workflows/ci.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,9 @@ jobs:
4444

4545
build:
4646
name: Build charm
47-
uses: canonical/data-platform-workflows/.github/workflows/build_charms_with_cache.yaml@v7.0.0
47+
uses: canonical/data-platform-workflows/.github/workflows/build_charms_with_cache.yaml@v9.0.0
4848
with:
4949
charmcraft-snap-channel: beta
50-
permissions:
51-
actions: write # Needed to manage GitHub Actions cache
5250

5351
integration-test:
5452
strategy:
@@ -63,7 +61,7 @@ jobs:
6361
- lint
6462
- unit-test
6563
- build
66-
uses: canonical/data-platform-workflows/.github/workflows/integration_test_charm.yaml@v7.0.0
64+
uses: canonical/data-platform-workflows/.github/workflows/integration_test_charm.yaml@v9.0.0
6765
with:
6866
artifact-name: ${{ needs.build.outputs.artifact-name }}
6967
cloud: microk8s

.github/workflows/release.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,10 @@ jobs:
2727
needs:
2828
- lib-check
2929
uses: ./.github/workflows/ci.yaml
30-
permissions:
31-
actions: write # Needed to manage GitHub Actions cache
3230

3331
build:
3432
name: Build charm
35-
uses: canonical/data-platform-workflows/.github/workflows/build_charm_without_cache.yaml@v7.0.0
33+
uses: canonical/data-platform-workflows/.github/workflows/build_charm_without_cache.yaml@v9.0.0
3634
with:
3735
charmcraft-snap-channel: beta
3836

@@ -42,7 +40,7 @@ jobs:
4240
- lib-check
4341
- ci-tests
4442
- build
45-
uses: canonical/data-platform-workflows/.github/workflows/release_charm.yaml@v7.0.0
43+
uses: canonical/data-platform-workflows/.github/workflows/release_charm.yaml@v9.0.0
4644
with:
4745
channel: 8.0/edge
4846
artifact-name: ${{ needs.build.outputs.artifact-name }}

.github/workflows/sync_issue_to_jira.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
jobs:
1010
sync:
1111
name: Sync GitHub issue to Jira
12-
uses: canonical/data-platform-workflows/.github/workflows/sync_issue_to_jira.yaml@v7.0.0
12+
uses: canonical/data-platform-workflows/.github/workflows/sync_issue_to_jira.yaml@v9.0.0
1313
with:
1414
jira-base-url: https://warthogs.atlassian.net
1515
jira-project-key: DPE

CONTRIBUTING.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,13 @@ this operator.
2626
creates a linear Git commit history.
2727

2828
## Developing
29-
Install `tox` and `poetry`
29+
Install `tox`, `poetry`, and `charmcraftcache`
30+
31+
Install pipx: https://pipx.pypa.io/stable/installation/
3032
```shell
31-
python3 -m pip install --user pipx
32-
python3 -m pipx ensurepath
3333
pipx install tox
3434
pipx install poetry
35+
pipx install charmcraftcache
3536
```
3637

3738
You can create an environment for development:
@@ -55,7 +56,7 @@ tox # runs 'lint' and 'unit' environments
5556
Build the charm in this git repository using:
5657

5758
```shell
58-
tox run -e build
59+
tox run -e build-dev
5960
```
6061

6162
### Deploy

charmcraft.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ parts:
1515
craftctl default
1616
if [[ ! -f requirements.txt ]]
1717
then
18-
echo 'ERROR: Use "tox run -e build" instead of calling "charmcraft pack" directly' >&2
18+
echo 'ERROR: Use "tox run -e build-dev" instead of calling "charmcraft pack" directly' >&2
1919
exit 1
2020
fi
2121
charm-strict-dependencies: true

poetry.lock

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ pytest-mock = "^3.11.1"
5555
[tool.poetry.group.integration.dependencies]
5656
pytest = "^7.4.0"
5757
pytest-operator = "^0.28.0"
58-
pytest-operator-cache = {git = "https://github.com/canonical/data-platform-workflows", tag = "v7.0.0", subdirectory = "python/pytest_plugins/pytest_operator_cache"}
59-
pytest-operator-groups = {git = "https://github.com/canonical/data-platform-workflows", tag = "v7.0.0", subdirectory = "python/pytest_plugins/pytest_operator_groups"}
58+
pytest-operator-cache = {git = "https://github.com/canonical/data-platform-workflows", tag = "v9.0.0", subdirectory = "python/pytest_plugins/pytest_operator_cache"}
59+
pytest-operator-groups = {git = "https://github.com/canonical/data-platform-workflows", tag = "v9.0.0", subdirectory = "python/pytest_plugins/pytest_operator_groups"}
6060
juju = "^3.2.2"
6161
mysql-connector-python = "~8.0.33"
6262
pyyaml = "^6.0.1"

tox.ini

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,14 @@ set_env =
1818
allowlist_externals =
1919
poetry
2020

21-
[testenv:{build,pack-wrapper}]
21+
[testenv:build-{production,dev,wrapper}]
2222
# Wrap `charmcraft pack`
2323
pass_env =
24-
CRAFT_SHARED_CACHE
24+
CI
2525
allowlist_externals =
2626
{[testenv]allowlist_externals}
2727
charmcraft
28+
charmcraftcache
2829
mv
2930
commands_pre =
3031
# TODO charm versioning: Remove
@@ -36,7 +37,8 @@ commands_pre =
3637

3738
poetry export --only main,charm-libs --output requirements.txt
3839
commands =
39-
build: charmcraft pack {posargs}
40+
build-production: charmcraft pack {posargs}
41+
build-dev: charmcraftcache pack {posargs}
4042
commands_post =
4143
mv requirements.txt requirements-last-build.txt
4244
mv charm_version.backup charm_version
@@ -80,11 +82,11 @@ pass_env =
8082
CI
8183
GITHUB_OUTPUT
8284
allowlist_externals =
83-
{[testenv:pack-wrapper]allowlist_externals}
85+
{[testenv:build-wrapper]allowlist_externals}
8486
commands_pre =
8587
poetry install --only integration
86-
{[testenv:pack-wrapper]commands_pre}
88+
{[testenv:build-wrapper]commands_pre}
8789
commands =
8890
poetry run pytest -v --tb native --log-cli-level=INFO -s --ignore={[vars]tests_path}/unit/ {posargs}
8991
commands_post =
90-
{[testenv:pack-wrapper]commands_post}
92+
{[testenv:build-wrapper]commands_post}

0 commit comments

Comments
 (0)