diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 6cdf8d5..50a7257 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -12,7 +12,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest] - go-version: ["1.18", "1.19", "1.20", "1.21", "1.22"] + go-version: ["1.21", "1.22", "1.23"] runs-on: ${{ matrix.os }} steps: - name: Install SSH Key @@ -37,13 +37,43 @@ jobs: uses: actions/setup-go@v5 with: go-version: ${{ matrix.go-version }} - - name: Lint - if: ${{ matrix.go-version == '1.19' || matrix.go-version == '1.20' || matrix.go-version == '1.21' || matrix.go-version == '1.22'}} - working-directory: ./sdk-repo-updated - run: make lint skip-non-generated-files=true - name: Test working-directory: ./sdk-repo-updated run: make test skip-non-generated-files=true + + lint-go: + name: CI [Go] + strategy: + matrix: + os: [ubuntu-latest, macos-latest] + runs-on: ${{ matrix.os }} + steps: + - name: Install SSH Key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SSH_PRIVATE_KEY }} + known_hosts: ${{ vars.SSH_KNOWN_HOSTS }} + - name: Install Java + uses: actions/setup-java@v4 + with: + distribution: "temurin" + java-version: ${{ env.JAVA_VERSION }} + - name: Checkout + uses: actions/checkout@v4 + - name: Build + uses: ./.github/actions/build/go + with: + go-version: ${{ env.GO_VERSION_BUILD }} + - name: Generate SDK + uses: ./.github/actions/generate-sdk/go + - name: Install Go ${{ env.GO_VERSION_BUILD }} + uses: actions/setup-go@v5 + with: + go-version: ${{ env.GO_VERSION_BUILD }} + - name: Lint + working-directory: ./sdk-repo-updated + run: make lint skip-non-generated-files=true + main-python: name: CI [Python] strategy: diff --git a/blacklist.txt b/blacklist.txt new file mode 100644 index 0000000..51d6061 --- /dev/null +++ b/blacklist.txt @@ -0,0 +1,3 @@ +# Transitional file to force generation of the new regional api for selected services +# It will be removed when all services have been migrated to the new regional api +modelserving \ No newline at end of file diff --git a/scripts/generate-sdk/languages/go.sh b/scripts/generate-sdk/languages/go.sh index 74a0130..c8e451c 100644 --- a/scripts/generate-sdk/languages/go.sh +++ b/scripts/generate-sdk/languages/go.sh @@ -130,6 +130,11 @@ generate_go_sdk() { exit 1 fi + if grep -E "^$service$" ${ROOT_DIR}/blacklist.txt; then + echo "Skipping blacklisted service ${service}" + continue + fi + echo -e "\n>> Generating \"${service}\" service..." cd ${ROOT_DIR} diff --git a/scripts/generate-sdk/languages/python.sh b/scripts/generate-sdk/languages/python.sh index 52d45c5..71417d4 100644 --- a/scripts/generate-sdk/languages/python.sh +++ b/scripts/generate-sdk/languages/python.sh @@ -89,6 +89,11 @@ generate_python_sdk() { service=$(echo "${service}" | tr '[:upper:]' '[:lower:]') # convert upper case letters to lower case service=$(echo "${service}" | tr -d -c '[:alnum:]') # remove non-alphanumeric characters + if grep -E "^$service$" ${ROOT_DIR}/blacklist.txt; then + echo "Skipping blacklisted service ${service}" + continue + fi + echo ">> Generating \"${service}\" service..." cd ${ROOT_DIR}