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

[DPE-5599][Juju 3.6] Break PR/worflow & nightly tests + DPW update #467

Merged
merged 29 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
73be5ca
[DPE-5599][Juju 3.6] Break PR/worflow & nightly tests + DPW update
phvalguima Oct 2, 2024
7ac64dc
Rename ci.yaml to workflow.yaml
phvalguima Oct 2, 2024
b756e9b
Move away from agent to snap channel versions
phvalguima Oct 2, 2024
6d5789b
Create nightly.yaml
phvalguima Oct 2, 2024
944ebce
Update release.yaml
phvalguima Oct 2, 2024
8c3e68c
Update nightly.yaml
phvalguima Oct 2, 2024
3ab2bda
Update release.yaml
phvalguima Oct 2, 2024
115df1c
Update workflow.yaml
phvalguima Oct 2, 2024
1aba2af
Update CONTRIBUTING.md
phvalguima Oct 2, 2024
b1c0a8f
Update charmcraft.yaml
phvalguima Oct 2, 2024
3273889
Update charmcraft.yaml
phvalguima Oct 2, 2024
038794c
Update and rename workflow.yaml to ci.yaml
phvalguima Oct 2, 2024
88491f2
Delete .github/workflows/nightly.yaml
phvalguima Oct 2, 2024
f44d252
Update release.yaml
phvalguima Oct 2, 2024
057b694
Move to 3.5.4 as we want the latest stable juju
phvalguima Oct 3, 2024
4c1fe43
Update ci.yaml
phvalguima Oct 3, 2024
cb9151f
Update ci.yaml
phvalguima Oct 3, 2024
1c131cb
Update ci.yaml
phvalguima Oct 3, 2024
b42c024
Update ci.yaml
phvalguima Oct 3, 2024
5aff704
Update ci.yaml
phvalguima Oct 3, 2024
5dee779
Update ci.yaml
phvalguima Oct 3, 2024
8a85ec2
Update pyproject.toml
phvalguima Oct 3, 2024
b80eb56
Update charmcraft.yaml
phvalguima Oct 3, 2024
2d660ec
Update tox.ini
phvalguima Oct 3, 2024
55c45ed
Update tox.ini
phvalguima Oct 3, 2024
7f764ef
Update tox ini to use external poetry
phvalguima Oct 3, 2024
fac6591
Fix poetry.lock
phvalguima Oct 3, 2024
1bfde76
Update project toml
phvalguima Oct 7, 2024
932fd4f
Update release.yaml
phvalguima Oct 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions .github/workflows/ci.yaml → .github/workflows/nightly.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
# Copyright 2024 Canonical Ltd.
# See LICENSE file for licensing details.
name: Tests
name: Nightly Tests

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

on:
pull_request:
schedule:
- cron: '53 0 * * *' # Daily at 00:53 UTC
# Triggered on push to branch "main" by .github/workflows/release.yaml
workflow_call:

jobs:
lint:
name: Lint
uses: canonical/data-platform-workflows/.github/workflows/lint.yaml@v21.0.1
uses: canonical/data-platform-workflows/.github/workflows/lint.yaml@v22.0.0

unit-test:
name: Unit test charm
Expand Down Expand Up @@ -61,22 +58,22 @@ jobs:
path:
- .
- ./tests/integration/relations/opensearch_provider/application-charm/
uses: canonical/data-platform-workflows/.github/workflows/build_charm.yaml@v21.0.1
uses: canonical/data-platform-workflows/.github/workflows/build_charm.yaml@v22.0.0
with:
path-to-charm-directory: ${{ matrix.path }}
cache: true

integration-test:
name: Integration test charm | 3.5.3
name: Integration test charm | 3.6
needs:
- lint
- unit-test
- build
uses: canonical/data-platform-workflows/.github/workflows/integration_test_charm.yaml@v21.0.1
uses: canonical/data-platform-workflows/.github/workflows/integration_test_charm.yaml@v22.0.0
with:
artifact-prefix: packed-charm-cache-true
cloud: lxd
juju-agent-version: 3.5.3
juju-snap-channel: 3.6/beta
_beta_allure_report: true
secrets:
# GitHub appears to redact each line of a multi-line secret
Expand Down
25 changes: 4 additions & 21 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,42 +5,25 @@ name: Release to latest/edge
on:
push:
branches:
- main
- 2/edge

jobs:
ci-tests:
name: Tests
uses: ./.github/workflows/ci.yaml
uses: ./.github/workflows/workflow.yaml
secrets: inherit
permissions:
contents: write # Needed for Allure Report beta

# release-libraries:
phvalguima marked this conversation as resolved.
Show resolved Hide resolved
# name: Release libraries
# needs:
# - ci-tests
# runs-on: ubuntu-latest
# timeout-minutes: 60
# steps:
# - name: Checkout
# uses: actions/checkout@v3
# with:
# fetch-depth: 0
# - name: Release charm libraries
# uses: canonical/charming-actions/[email protected]
# with:
# credentials: ${{ secrets.CHARMHUB_TOKEN }}
# github-token: ${{ secrets.GITHUB_TOKEN }}

build:
name: Build charm
uses: canonical/data-platform-workflows/.github/workflows/build_charm.yaml@v21.0.1
uses: canonical/data-platform-workflows/.github/workflows/build_charm.yaml@v22.0.0

release:
name: Release charm
needs:
- build
uses: canonical/data-platform-workflows/.github/workflows/release_charm.yaml@v21.0.1
uses: canonical/data-platform-workflows/.github/workflows/release_charm.yaml@v22.0.0
with:
channel: 2/edge
artifact-prefix: ${{ needs.build.outputs.artifact-prefix }}
Expand Down
89 changes: 89 additions & 0 deletions .github/workflows/workflow.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# Copyright 2024 Canonical Ltd.
# See LICENSE file for licensing details.
name: Tests

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

on:
pull_request:
# Triggered on push to branch "2/edge" by .github/workflows/release.yaml
workflow_call:

jobs:
lint:
name: Lint
uses: canonical/data-platform-workflows/.github/workflows/[email protected]

unit-test:
name: Unit test charm
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install tox & poetry
run: |
pipx install tox
pipx install poetry
- name: Run tests
run: tox run -e unit


lib-check:
name: Check libraries
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- run: |
# Workaround for https://github.com/canonical/charmcraft/issues/1389#issuecomment-1880921728
touch requirements.txt
- name: Check libs
uses: canonical/charming-actions/[email protected]
with:
credentials: ${{ secrets.CHARMHUB_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
use-labels: false
fail-build: ${{ github.event_name == 'pull_request' }}

build:
name: Build charm
strategy:
fail-fast: false
matrix:
path:
- .
- ./tests/integration/relations/opensearch_provider/application-charm/
uses: canonical/data-platform-workflows/.github/workflows/[email protected]
with:
path-to-charm-directory: ${{ matrix.path }}
cache: true

integration-test:
name: Integration test charm | 3.5
needs:
- lint
- unit-test
- build
uses: canonical/data-platform-workflows/.github/workflows/[email protected]
with:
artifact-prefix: packed-charm-cache-true
cloud: lxd
juju-snap-channel: 3.5/stable
_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
Loading