Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set controller channel to 3.4 in CI #40

Merged
merged 6 commits into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 5 additions & 3 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ on:
- '**.md'
- '**.rst'

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
lint-unit:
uses: canonical/bootstack-actions/.github/workflows/lint-unit.yaml@v2
Expand All @@ -19,7 +23,6 @@ jobs:
python-version: ["3.8", "3.10"]
with:
python-version: ${{ matrix.python-version }}
tox-version: "<4"

func:
uses: canonical/bootstack-actions/.github/workflows/func.yaml@v2
Expand All @@ -32,9 +35,8 @@ jobs:
- command: "FUNC_ARGS='--series jammy' make functional"
with:
command: ${{ matrix.command }}
juju-channel: "3.1/stable"
juju-channel: "3.4/stable"
nested-containers: false
provider: "lxd"
python-version: "3.10"
timeout-minutes: 120
tox-version: "<4"
10 changes: 2 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# This is a template `Makefile` file for ops charms
# This file is managed by bootstack-charms-spec and should not be modified
# within individual charm repos. https://launchpad.net/bootstack-charms-spec

PYTHON := /usr/bin/python3

PROJECTPATH=$(dir $(realpath $(MAKEFILE_LIST)))
Expand Down Expand Up @@ -47,8 +43,6 @@ submodules-update:
@git submodule update --init --recursive --remote --merge

clean:
@echo "Cleaning files"
@git clean -ffXd -e '!.idea' -e '!.vscode'
@echo "Cleaning existing build"
@rm -rf ${PROJECTPATH}/${CHARM_NAME}*.charm
@echo "Cleaning charmcraft"
Expand Down Expand Up @@ -77,8 +71,8 @@ unittests:
@tox -e unit -- ${UNIT_ARGS}

functional:
@echo "Executing functional tests using built charm at ${PROJECTPATH}"
@CHARM_LOCATION=${PROJECTPATH} tox -e func -- ${FUNC_ARGS}
@echo "Executing functional tests with args: ${FUNC_ARGS}"
@tox -e func -- ${FUNC_ARGS}

test: lint unittests functional
@echo "Tests completed for charm ${CHARM_NAME}."
Expand Down
11 changes: 8 additions & 3 deletions tests/functional/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,17 @@ def series(request):
return request.config.getoption("--series")


@pytest.fixture(scope="class")
@pytest.fixture
def apt_mirror_app(ops_test):
return ops_test.model.applications["apt-mirror"]


@pytest.fixture(scope="class")
@pytest.fixture
def apt_mirror_unit(apt_mirror_app):
return apt_mirror_app.units[0]


@pytest.fixture(scope="class")
@pytest.fixture
def configs(apt_mirror_app):
async def get_config_synced():
return await apt_mirror_app.get_config()
Expand All @@ -59,3 +59,8 @@ async def get_config_synced():
@pytest.fixture(scope="class")
def helper():
return Helper


@pytest.fixture
def base_path(configs):
return configs.get("base-path").get("value")