diff --git a/.github/workflows/helm-package.yml b/.github/workflows/helm-package.yml index cab28487a..2bce4bee1 100644 --- a/.github/workflows/helm-package.yml +++ b/.github/workflows/helm-package.yml @@ -145,7 +145,9 @@ jobs: uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: helm-package - path: helm/rustfs/*.tgz + path: | + helm/rustfs/*.tgz + helm/rustfs/README.md retention-days: 1 publish-helm-package: diff --git a/scripts/test_helm_release_workflow.py b/scripts/test_helm_release_workflow.py index a178f5eca..d64b55cfe 100644 --- a/scripts/test_helm_release_workflow.py +++ b/scripts/test_helm_release_workflow.py @@ -113,6 +113,23 @@ sleep() { self.assertLess(gate, package) self.assertNotIn("continue-on-error", workflow[gate:package]) + def test_upload_artifact_includes_chart_and_readme(self): + workflow = WORKFLOW.read_text() + copy_readme = workflow.index("cp helm/README.md helm/rustfs/") + upload = workflow.index(" - name: Upload helm package as artifact") + self.assertLess(copy_readme, upload) + + publish = workflow.index(" publish-helm-package:", upload) + upload_step = workflow[upload:publish] + expected_path = "path: |\n helm/rustfs/*.tgz\n helm/rustfs/README.md\n" + self.assertIn(expected_path, upload_step) + + download = workflow.index(" - name: Download helm package", publish) + push_step = workflow.index(" - name: Push helm package and index file", download) + download_step = workflow[download:push_step] + self.assertIn("name: helm-package", download_step) + self.assertIn("path: ./", download_step) + if __name__ == "__main__": unittest.main()