From fcd3af0df02a1d1dade4cdaad33a7ad2648df43c Mon Sep 17 00:00:00 2001 From: jungle Date: Fri, 17 Nov 2023 11:24:36 +0000 Subject: [PATCH] custom action --- .github/actions/swagger-codegen/action.yml | 6 ++++-- .github/workflows/workflow-test.yml | 10 +++++++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/actions/swagger-codegen/action.yml b/.github/actions/swagger-codegen/action.yml index c61cd4d..6f25aaf 100644 --- a/.github/actions/swagger-codegen/action.yml +++ b/.github/actions/swagger-codegen/action.yml @@ -11,8 +11,10 @@ runs: - ${{ inputs.action }} - '-i' - ${{ inputs.input }} - - '-l' - - ${{ inputs.language }} + - '-l python' + - '-o' + - ${{ inputs.output }} + - '-DpackageName=src.cudo_compute' inputs: language: description: Swagger language diff --git a/.github/workflows/workflow-test.yml b/.github/workflows/workflow-test.yml index ffc394f..bf7500a 100644 --- a/.github/workflows/workflow-test.yml +++ b/.github/workflows/workflow-test.yml @@ -12,9 +12,17 @@ jobs: - name: Run Swagger Codegen uses: ./.github/actions/swagger-codegen with: - language: python + output: out input: swagger/public.swagger.json action: generate + - name: Copy files + run: | + rm -rf src + cp -r out/src src + cp helpers/* src/cudo_compute + echo "import src.cudo_compute.auth_config as AuthConfig" >> src/cudo_compute/__init__.py + echo "import src.cudo_compute.cudo_client as CudoClient" >> src/cudo_compute/__init__.py + rm -rf out # build: