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

Resurrect edge/candidate testing #1197

Open
dimaqq opened this issue Nov 19, 2024 · 2 comments
Open

Resurrect edge/candidate testing #1197

dimaqq opened this issue Nov 19, 2024 · 2 comments
Labels
kind/wishlist requested feature

Comments

@dimaqq
Copy link
Contributor

dimaqq commented Nov 19, 2024

Description

I'm disabling edge and candidate testing (2 workflows) because they are not useful:

always fails:
https://github.com/juju/python-libjuju/actions/workflows/test_edge.yaml

always succeeds with "no candidate to test":
https://github.com/juju/python-libjuju/actions/workflows/test_edge.yaml

the workflow is also buggy, I'll attach a wip diff.

one day, these tests need to be revived, though against 3.6 and not 3.1

Urgency

Casually wishlisting

Code I'd Like to Run

...
@dimaqq dimaqq added the kind/wishlist requested feature label Nov 19, 2024
@dimaqq
Copy link
Contributor Author

dimaqq commented Nov 19, 2024

diff --git a/.github/workflows/test_edge.yaml b/.github/workflows/test_edge.yaml
index 27a949c..910479d 100644
--- a/.github/workflows/test_edge.yaml
+++ b/.github/workflows/test_edge.yaml
@@ -13,20 +13,27 @@ jobs:
       matrix:
         python:
           - "3.8"
-          - "3.9"
           - "3.10"
+          - "3.12"
+        juju:
+          - "3.1/edge"
+          - "3.2/edge"
+          - "3.3/edge"
+          - "3.4/edge"
+          - "3.5/edge"
+          - "3.6/edge"
     steps:
       - name: Download artifact from previous workflow
         id: download_artifact
-        uses: dawidd6/action-download-artifact@v2
+        uses: actions/download-artifact@v4
         with:
           workflow_conclusion: success
-          name: juju-last-edge-version
+          name: juju-last-edge-version-${{ matrix.python }}
           if_no_artifact_found: ignore
       - name: Check if there is a new candidate
         shell: bash
         run: |
-          edge=$(snap info juju | grep 3.1/edge | awk '{print $2}')
+          edge=$(snap info juju | grep $${ matrix.juju }} | awk '{print $2}')
           last_tested=NA
           if [ -f juju-last-edge-version ]; then
             last_tested=$(cat juju-last-edge-version)
@@ -34,7 +41,7 @@ jobs:
           echo "Last tested was $last_tested"
           echo "Latest juju version found is $edge"
           next_test=NA
-          if [[ "$edge" == "^" ]]; then
+          if [[ -z "$edge" ]]; then
             echo "No edge to test"
           else
             if [[ "$edge" == "$last_tested" ]]; then
@@ -59,7 +66,7 @@ jobs:
         uses: charmed-kubernetes/actions-operator@main
         with:
           provider: lxd
-          juju-channel: 3.4/edge
+          juju-channel: ${{ matrix.juju }}
       - name: Run integration
         if: ${{ env.next-test != 'NA' }}
         # Force one single concurrent test
@@ -68,5 +75,5 @@ jobs:
         if: ${{ env.next-test != 'NA' }}
         uses: actions/upload-artifact@v4
         with:
-          name: juju-last-edge-version
+          name: juju-last-edge-version-${{ matrix.python }}
           path: ~/juju-last-edge-version

@dimaqq
Copy link
Contributor Author

dimaqq commented Nov 19, 2024

current issue: tests are ran in parallel and step on each other's "juju-last-edge-version" artifact toes, upload fails when this key exists. arguably overwrite: true is needed, and per-matrix-combo unique key.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/wishlist requested feature
Projects
None yet
Development

No branches or pull requests

1 participant