Skip to content

Commit 3973b33

Browse files
Install python tools in the pipeline (#118)
* Install python tools in the pipeline * Adjust CI pipeline
1 parent 43a7eeb commit 3973b33

File tree

4 files changed

+28
-24
lines changed

4 files changed

+28
-24
lines changed

.github/actions/build/action.yaml renamed to .github/actions/build/go/action.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ runs:
1313
go-version: ${{ inputs.go-version }}
1414
- name: Install project tools and dependencies
1515
shell: bash
16-
run: make project-tools
16+
run: make project-tools
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
name: Build
2+
description: "Build tools"
3+
runs:
4+
using: "composite"
5+
steps:
6+
- name: Install project tools and dependencies
7+
shell: bash
8+
run: make project-tools LANGUAGE=python

.github/workflows/ci.yaml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
- name: Checkout
2929
uses: actions/checkout@v4
3030
- name: Build
31-
uses: ./.github/actions/build
31+
uses: ./.github/actions/build/go
3232
with:
3333
go-version: ${{ env.GO_VERSION_BUILD }}
3434
- name: Generate SDK
@@ -63,29 +63,27 @@ jobs:
6363
distribution: "temurin"
6464
java-version: ${{ env.JAVA_VERSION }}
6565
- name: Checkout
66-
uses: actions/checkout@v4
66+
uses: actions/checkout@v4
6767
- name: Build
68-
uses: ./.github/actions/build
69-
with:
70-
go-version: ${{ env.GO_VERSION_BUILD }}
68+
uses: ./.github/actions/build/python
7169
- name: Generate SDK
7270
uses: ./.github/actions/generate-sdk/python
7371
- name: Install Python ${{ matrix.python-version }}
7472
uses: actions/setup-python@v5
7573
with:
7674
python-version: ${{ matrix.python-version }}
77-
- name: Install core
75+
- name: Install core
7876
run: |
7977
pip install poetry
8078
poetry config virtualenvs.create false
8179
git clone https://github.com/stackitcloud/stackit-sdk-python-core.git core
8280
cd core;make install;
8381
- name: Install sdk
8482
working-directory: ./sdk-repo-updated
85-
run: make install-dev
86-
- name: Lint
83+
run: make install-dev
84+
- name: Lint
8785
working-directory: ./sdk-repo-updated
88-
run: make lint
86+
run: make lint
8987
- name: Test
9088
working-directory: ./sdk-repo-updated
9189
run: make test

.github/workflows/sdk-pr.yaml

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ on:
77
workflow_dispatch:
88

99
env:
10-
GO_VERSION: '1.22'
11-
JAVA_VERSION: '11'
10+
GO_VERSION: "1.22"
11+
JAVA_VERSION: "11"
1212

1313
jobs:
1414
main-go:
@@ -23,22 +23,22 @@ jobs:
2323
- name: Install Java
2424
uses: actions/setup-java@v4
2525
with:
26-
distribution: 'temurin'
26+
distribution: "temurin"
2727
java-version: ${{ env.JAVA_VERSION }}
2828
- name: Checkout
2929
uses: actions/checkout@v4
3030
- name: Build
31-
uses: ./.github/actions/build
31+
uses: ./.github/actions/build/go
3232
with:
3333
go-version: ${{ env.GO_VERSION }}
3434
- name: Generate SDK
3535
uses: ./.github/actions/generate-sdk/go
3636
- name: Push SDK
37-
env:
38-
GH_REPO: 'stackitcloud/stackit-sdk-go'
37+
env:
38+
GH_REPO: "stackitcloud/stackit-sdk-go"
3939
GH_TOKEN: ${{ secrets.SDK_PR_TOKEN }}
4040
run: |
41-
scripts/sdk-create-pr.sh "generator-bot-${{ github.run_id }}" "Generated from GitHub run [${{ github.run_id }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})"
41+
scripts/sdk-create-pr.sh "generator-bot-${{ github.run_id }}" "Generated from GitHub run [${{ github.run_id }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})"
4242
main-python:
4343
name: "[Python] Update SDK Repo"
4444
runs-on: ubuntu-latest
@@ -51,19 +51,17 @@ jobs:
5151
- name: Install Java
5252
uses: actions/setup-java@v4
5353
with:
54-
distribution: 'temurin'
54+
distribution: "temurin"
5555
java-version: ${{ env.JAVA_VERSION }}
5656
- name: Checkout
5757
uses: actions/checkout@v4
5858
- name: Build
59-
uses: ./.github/actions/build
60-
with:
61-
go-version: ${{ env.GO_VERSION }}
59+
uses: ./.github/actions/build/python
6260
- name: Generate SDK
6361
uses: ./.github/actions/generate-sdk/python
6462
- name: Push SDK
65-
env:
66-
GH_REPO: 'stackitcloud/stackit-sdk-python'
63+
env:
64+
GH_REPO: "stackitcloud/stackit-sdk-python"
6765
GH_TOKEN: ${{ secrets.SDK_PR_TOKEN }}
6866
run: |
69-
scripts/sdk-create-pr.sh "generator-bot-${{ github.run_id }}" "Generated from GitHub run [${{ github.run_id }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})" "git@github.com:stackitcloud/stackit-sdk-python.git" "python"
67+
scripts/sdk-create-pr.sh "generator-bot-${{ github.run_id }}" "Generated from GitHub run [${{ github.run_id }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})" "git@github.com:stackitcloud/stackit-sdk-python.git" "python"

0 commit comments

Comments
 (0)