Skip to content

Commit

Permalink
feat: support extends parameters for all language
Browse files Browse the repository at this point in the history
  • Loading branch information
yndu13 committed May 11, 2024
1 parent 87eb01d commit c55fd16
Show file tree
Hide file tree
Showing 35 changed files with 435 additions and 401 deletions.
110 changes: 0 additions & 110 deletions .appveyor.yml

This file was deleted.

56 changes: 46 additions & 10 deletions .github/workflows/swift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,56 @@ defaults:
working-directory: swift

jobs:
build:
build-ubuntu-latest:
name: Swift ${{ matrix.swift }} on ubuntu-latest
strategy:
matrix:
# ubuntu swift5.6及以下版本下载会报gpg签名错误,已知bug等官方解决
swift: ["5.7", "5.8", "5.9", "5.10"]
fail-fast: false
runs-on: ubuntu-latest
steps:
- uses: swift-actions/setup-swift@v2
with:
swift-version: ${{ matrix.swift }}
- uses: actions/checkout@v4
- name: Build
run: swift build -v
- name: Run tests
run: swift test --enable-code-coverage -v

build-macos-latest:
name: Swift ${{ matrix.swift }} on macos-latest
strategy:
matrix:
swift: ["5.9", "5.10"]
fail-fast: false
runs-on: macos-latest
steps:
- uses: swift-actions/setup-swift@v2
with:
swift-version: ${{ matrix.swift }}
- uses: actions/checkout@v4
- name: Verify Xcode Version
run: xcodebuild -version
- name: Build
run: swift build -v
- name: Run tests
run: swift test --enable-code-coverage -v

build-macos-11:
name: Swift ${{ matrix.swift }} on macos-11
strategy:
matrix:
swift: ["5.5", "5.6", "5.7", "5.8"]
fail-fast: false
runs-on: macos-11
steps:
- uses: actions/checkout@v3
- name: Set default Xcode version
shell: bash
run: |
echo "Switching Xcode to version '13.0'..."
sudo xcode-select --switch /Applications/Xcode_13.0.app
- name: Install gems
run: bundle install
- uses: swift-actions/setup-swift@v2
with:
swift-version: ${{ matrix.swift }}
- uses: actions/checkout@v4
- name: Build
run: swift build -v
- name: Run tests
run: swift test -v
run: swift test --enable-code-coverage -v
2 changes: 1 addition & 1 deletion .github/workflows/testGo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go: [1.13, 1.14, 1.15, 1.16]
go: ["1.13", "1.14", "1.15", "1.16", "1.17", "1.18", "1.19", "1.20", "1.21"]
fail-fast: false

steps:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/testJava.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@ jobs:
strategy:
matrix:
# test against latest update of each major Java version, as well as specific updates of LTS versions:
# 20, 21还不支持,报错是Source option 7 is no longer supported. Use 8 or later.
java: [7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19]
fail-fast: false

steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/testPython.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
fail-fast: false

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/testTS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

strategy:
matrix:
node-version: [10.x, 12.x, 14.x]
node-version: [10.x, 12.x, 14.x, 16.x, 18.x, 20.x]
fail-fast: false

steps:
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,5 @@ java/bin/
java/.classpath
.vscode/
cc/*.o
*.sum
python/**/__pycache__/
cache/
75 changes: 0 additions & 75 deletions .travis.yml

This file was deleted.

21 changes: 21 additions & 0 deletions csharp/core/Models/ExtendsParameters.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/**
* This is a utility module
*/
// This file is auto-generated, don't edit it. Thanks.

using System;
using System.Collections.Generic;
using System.IO;

using Tea;

namespace AlibabaCloud.TeaUtil.Models
{
public class ExtendsParameters : TeaModel {
[NameInMap("headers")]
[Validation(Required=false)]
public Dictionary<string, string> Headers { get; set; }

}

}
7 changes: 7 additions & 0 deletions csharp/core/Models/RuntimeOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,12 @@ public class RuntimeOptions : TeaModel
[Validation(Required = false)]
public bool? KeepAlive { get; set; }

/// <summary>
/// Extends Parameters
/// </summary>
[NameInMap("extendsParameters")]
[Validation(Required=false)]
public ExtendsParameters ExtendsParameters { get; set; }

}
}
2 changes: 1 addition & 1 deletion csharp/core/TeaUtil.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="Tea" Version="1.0.2" />
<PackageReference Include="Tea" Version="1.0.11" />
</ItemGroup>

<ItemGroup>
Expand Down
9 changes: 9 additions & 0 deletions csharp/tests/Models/RuntimeObjectTest.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using AlibabaCloud.TeaUtil.Models;

using System.Collections.Generic;
using Xunit;

namespace tests.Models
Expand Down Expand Up @@ -29,6 +30,12 @@ public void Test_RuntimeObject()
runtime.Socks5Proxy = "socks5Proxy";
runtime.KeepAlive = false;

ExtendsParameters extendsParameters = new ExtendsParameters();
extendsParameters.Headers = new Dictionary<string, string>{
{"key", "value"},
};
runtime.ExtendsParameters = extendsParameters;

Assert.NotNull(runtime);
Assert.True(runtime.Autoretry);
Assert.Equal(1, runtime.BackoffPeriod);
Expand All @@ -48,6 +55,8 @@ public void Test_RuntimeObject()
Assert.Equal("socks5", runtime.Socks5NetWork);
Assert.Equal("socks5Proxy", runtime.Socks5Proxy);
Assert.False(runtime.KeepAlive);
Assert.NotNull(runtime.ExtendsParameters);
Assert.Equal("value", runtime.ExtendsParameters.Headers["key"]);
}
}
}
5 changes: 1 addition & 4 deletions golang/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,4 @@ module github.com/alibabacloud-go/tea-utils/v2

go 1.14

require (
github.com/alibabacloud-go/tea v1.1.0
golang.org/x/net v0.17.0 // indirect
)
require github.com/alibabacloud-go/tea v1.2.2
Loading

0 comments on commit c55fd16

Please sign in to comment.