Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 31964a1

Browse files
committedApr 16, 2024
[ci] enable core24 snap in tests
1 parent 9da52f4 commit 31964a1

File tree

5 files changed

+15
-10
lines changed

5 files changed

+15
-10
lines changed
 

‎.github/workflows/integration-tests.yml

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ jobs:
1515
base:
1616
- core20
1717
- core22
18+
- core24
1819
fail-fast: false
1920
runs-on: ubuntu-latest
2021
steps:

‎test-snap/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ setup: snap-helpers snapcraft.yaml
66
.PHONY: setup
77

88
snap: setup
9-
SNAPCRAFT_BUILD_ENVIRONMENT=lxd snapcraft
9+
SNAPCRAFT_BUILD_ENVIRONMENT=lxd snapcraft -v
1010
.PHONY: snap
1111

1212
clean:

‎test-snap/bases.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,7 @@ core20:
44
core22:
55
python_version: '3.10'
66
build_cmd: craftctl default
7+
core24:
8+
python_version: '3.12'
9+
build_cmd: craftctl default
10+
build_base: devel

‎test-snap/render_snapcraft_yaml.py

+5-8
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
import argparse
22
from pathlib import Path
33
import sys
4-
from typing import (
5-
Any,
6-
Optional,
7-
)
4+
from typing import Any
85

96
from jinja2 import Template
107
import yaml
@@ -23,9 +20,7 @@ def parse_args() -> argparse.Namespace:
2320
return parser.parse_args()
2421

2522

26-
def get_base_data(
27-
data_file: Path, base: str
28-
) -> Optional[dict[str, dict[str, Any]]]:
23+
def get_base_data(data_file: Path, base: str) -> dict[str, dict[str, Any]]:
2924
with data_file.open() as fd:
3025
data = yaml.safe_load(fd)
3126
base_data = data.get(base)
@@ -34,7 +29,9 @@ def get_base_data(
3429
return base_data
3530

3631

37-
def render_template(template_file: Path, out_file: Path, data: dict[str, Any]):
32+
def render_template(
33+
template_file: Path, out_file: Path, data: dict[str, Any]
34+
) -> None:
3835
template = Template(template_file.read_text())
3936
out_file.write_text(template.render(**data))
4037

‎test-snap/snapcraft-template.yaml

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@ name: snap-helpers-testapp
22
version: '1.0'
33
summary: Test applicantion using snap-helpers
44
description: Test application using snap-helpers
5-
grade: stable
5+
grade: devel
66
confinement: strict
77
base: {{ base }}
8+
{%- if build_base %}
9+
build-base: {{ build_base }}
10+
{%- endif %}
811

912
plugs:
1013
snap-helpers-lib:

0 commit comments

Comments
 (0)
Please sign in to comment.