Skip to content

Commit

Permalink
Merge pull request #99 from canonical/DPE-5024/self_hosted_runners_al…
Browse files Browse the repository at this point in the history
…lure

[DPE-5024] Self hosted runners, Allure reports
  • Loading branch information
juditnovak authored Aug 6, 2024
2 parents a6c10ad + 6eae03c commit c38b84c
Show file tree
Hide file tree
Showing 8 changed files with 212 additions and 13 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
- .
- tests/integration/application-charm
name: Build charm
uses: canonical/data-platform-workflows/.github/workflows/build_charm.yaml@v16.2.1
uses: canonical/data-platform-workflows/.github/workflows/build_charm.yaml@v16.7.0
with:
path-to-charm-directory: ${{ matrix.path }}
cache: true
Expand All @@ -80,8 +80,20 @@ jobs:
- lint
- unit-test
- build
uses: canonical/data-platform-workflows/.github/workflows/integration_test_charm.yaml@v16.2.1
uses: canonical/data-platform-workflows/.github/workflows/integration_test_charm.yaml@v16.7.0
with:
artifact-prefix: packed-charm-cache-true
cloud: lxd
juju-agent-version: 3.4.3
_beta_allure_report: true
secrets:
# GitHub appears to redact each line of a multi-line secret
# Avoid putting `{` or `}` on a line by itself so that it doesn't get redacted in logs
integration-test: |
{ "AWS_ACCESS_KEY": "${{ secrets.AWS_ACCESS_KEY }}",
"AWS_SECRET_KEY": "${{ secrets.AWS_SECRET_KEY }}",
"GCP_ACCESS_KEY": "${{ secrets.GCP_ACCESS_KEY }}",
"GCP_SECRET_KEY": "${{ secrets.GCP_SECRET_KEY }}",
"GCP_SERVICE_ACCOUNT": "${{ secrets.GCP_SERVICE_ACCOUNT }}", }
permissions:
contents: write
6 changes: 4 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,19 @@ jobs:
name: Tests
uses: ./.github/workflows/ci.yaml
secrets: inherit
permissions:
contents: write # Needed for Allure Report beta

build:
name: Build charm
uses: canonical/data-platform-workflows/.github/workflows/build_charm.yaml@v16.2.1
uses: canonical/data-platform-workflows/.github/workflows/build_charm.yaml@v16.7.0

release:
name: Release charm
needs:
- ci-tests
- build
uses: canonical/data-platform-workflows/.github/workflows/release_charm.yaml@v16.2.1
uses: canonical/data-platform-workflows/.github/workflows/release_charm.yaml@v16.7.0
with:
channel: 2/edge
artifact-prefix: ${{ needs.build.outputs.artifact-prefix }}
Expand Down
162 changes: 157 additions & 5 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,12 @@ juju = "^3.2.0"
tenacity = "^8.4.2"
coverage = {extras = ["toml"], version = ">7.0"}
pytest-operator = ">0.20"
pytest-operator-cache = {git = "https://github.com/canonical/data-platform-workflows", tag = "v16.2.1", subdirectory = "python/pytest_plugins/pytest_operator_cache"}
pytest-operator-groups = {git = "https://github.com/canonical/data-platform-workflows", tag = "v16.2.1", subdirectory = "python/pytest_plugins/pytest_operator_groups"}
pytest-operator-cache = {git = "https://github.com/canonical/data-platform-workflows", tag = "v16.7.0", subdirectory = "python/pytest_plugins/pytest_operator_cache"}
pytest-operator-groups = {git = "https://github.com/canonical/data-platform-workflows", tag = "v16.7.0", subdirectory = "python/pytest_plugins/pytest_operator_groups"}
pytest-microceph = {git = "https://github.com/canonical/data-platform-workflows", tag = "v16.7.0", subdirectory = "python/pytest_plugins/microceph"}
pytest-github-secrets = {git = "https://github.com/canonical/data-platform-workflows", tag = "v16.7.0", subdirectory = "python/pytest_plugins/github_secrets"}
allure-pytest = "^2.13.5"
allure-pytest-collection-report = {git = "https://github.com/canonical/data-platform-workflows", tag = "v16.7.0", subdirectory = "python/pytest_plugins/allure_pytest_collection_report"}

[tool.pyright]
include = ["src"]
Expand Down
10 changes: 10 additions & 0 deletions tests/integration/ha/test_network_cut.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
LONG_WAIT = 30


@pytest.mark.runner(["self-hosted", "linux", "X64", "jammy", "large"])
@pytest.mark.skip(reason="https://warthogs.atlassian.net/browse/DPE-4903")
@pytest.mark.group(1)
@pytest.mark.skip_if_deployed
Expand Down Expand Up @@ -332,27 +333,31 @@ async def network_throttle_application(ops_test: OpsTest, https: bool = False):


@pytest.mark.skip(reason="https://warthogs.atlassian.net/browse/DPE-4903")
@pytest.mark.runner(["self-hosted", "linux", "X64", "jammy", "large"])
@pytest.mark.group(1)
@pytest.mark.abort_on_fail
async def test_network_cut_ip_change_leader_http(ops_test: OpsTest, request):
await network_cut_leader(ops_test)


@pytest.mark.skip(reason="https://warthogs.atlassian.net/browse/DPE-4903")
@pytest.mark.runner(["self-hosted", "linux", "X64", "jammy", "large"])
@pytest.mark.group(1)
@pytest.mark.abort_on_fail
async def test_network_cut_no_ip_change_leader_http(ops_test: OpsTest, request):
await network_throttle_leader(ops_test)


@pytest.mark.skip(reason="https://warthogs.atlassian.net/browse/DPE-4903")
@pytest.mark.runner(["self-hosted", "linux", "X64", "jammy", "large"])
@pytest.mark.group(1)
@pytest.mark.abort_on_fail
async def test_network_cut_ip_change_application_http(ops_test: OpsTest, request):
await network_cut_application(ops_test)


@pytest.mark.skip(reason="https://warthogs.atlassian.net/browse/DPE-4903")
@pytest.mark.runner(["self-hosted", "linux", "X64", "jammy", "large"])
@pytest.mark.group(1)
@pytest.mark.abort_on_fail
async def test_network_no_ip_change_application_http(ops_test: OpsTest, request):
Expand All @@ -363,6 +368,7 @@ async def test_network_no_ip_change_application_http(ops_test: OpsTest, request)


@pytest.mark.skip(reason="https://warthogs.atlassian.net/browse/DPE-4903")
@pytest.mark.runner(["self-hosted", "linux", "X64", "jammy", "large"])
@pytest.mark.group(1)
@pytest.mark.abort_on_fail
async def test_set_tls(ops_test: OpsTest, request):
Expand All @@ -381,27 +387,31 @@ async def test_set_tls(ops_test: OpsTest, request):


@pytest.mark.skip(reason="https://warthogs.atlassian.net/browse/DPE-4903")
@pytest.mark.runner(["self-hosted", "linux", "X64", "jammy", "large"])
@pytest.mark.group(1)
@pytest.mark.abort_on_fail
async def test_network_cut_ip_change_leader_https(ops_test: OpsTest, request):
await network_cut_leader(ops_test, https=True)


@pytest.mark.skip(reason="https://warthogs.atlassian.net/browse/DPE-4903")
@pytest.mark.runner(["self-hosted", "linux", "X64", "jammy", "large"])
@pytest.mark.group(1)
@pytest.mark.abort_on_fail
async def test_network_cut_no_ip_change_leader_https(ops_test: OpsTest, request):
await network_throttle_leader(ops_test, https=True)


@pytest.mark.skip(reason="https://warthogs.atlassian.net/browse/DPE-4903")
@pytest.mark.runner(["self-hosted", "linux", "X64", "jammy", "large"])
@pytest.mark.group(1)
@pytest.mark.abort_on_fail
async def test_network_cut_ip_change_application_https(ops_test: OpsTest, request):
await network_cut_application(ops_test, https=True)


@pytest.mark.skip(reason="https://warthogs.atlassian.net/browse/DPE-4903")
@pytest.mark.runner(["self-hosted", "linux", "X64", "jammy", "large"])
@pytest.mark.group(1)
@pytest.mark.abort_on_fail
async def test_network_cut_no_ip_change_application_https(ops_test: OpsTest, request):
Expand Down
Loading

0 comments on commit c38b84c

Please sign in to comment.