mirror of
https://github.com/Hill-98/aliyun-openapi-bash-sdk.git
synced 2025-10-22 01:39:18 +08:00
Add bats to git submodules
This commit is contained in:
12
.github/workflows/bats-test.yml
vendored
12
.github/workflows/bats-test.yml
vendored
@@ -3,24 +3,22 @@ on:
|
||||
push:
|
||||
paths:
|
||||
- AliyunOpenApiSDK.sh
|
||||
- test.bats.sh
|
||||
- test/test.bats.sh
|
||||
pull_request:
|
||||
paths:
|
||||
- AliyunOpenApiSDK.sh
|
||||
- test.bats.sh
|
||||
- test/test.bats.sh
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-18.04 # Test on old version bash
|
||||
steps:
|
||||
- name: Setup BATS
|
||||
uses: mig4/setup-bats@v1
|
||||
with:
|
||||
bats-version: 1.8.2
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: true
|
||||
- name: Run test
|
||||
env:
|
||||
AliAccessKeyId: ${{ secrets.ALIACCESSKEYID }}
|
||||
AliAccessKeySecret: ${{ secrets.ALIACCESSKEYSECRET }}
|
||||
run: bats test.bats.sh
|
||||
run: ./test/bats/bin/bats test/test.bats.sh
|
||||
|
9
.gitmodules
vendored
Normal file
9
.gitmodules
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
[submodule "test/bats"]
|
||||
path = test/bats
|
||||
url = https://github.com/bats-core/bats-core.git
|
||||
[submodule "test/test_helper/bats-support"]
|
||||
path = test/test_helper/bats-support
|
||||
url = https://github.com/bats-core/bats-support.git
|
||||
[submodule "test/test_helper/bats-assert"]
|
||||
path = test/test_helper/bats-assert
|
||||
url = https://github.com/bats-core/bats-assert.git
|
1
test/bats
Submodule
1
test/bats
Submodule
Submodule test/bats added at e8c840b58f
@@ -32,8 +32,7 @@ test_timestamp_rpc() { #@test
|
||||
run _aliapi_timestamp_rpc
|
||||
[[ $status -eq 0 ]]
|
||||
timestamp=$output
|
||||
|
||||
run grep -P "^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])T(0\d|[1]\d|2[0-3]):[0-5]\d:[0-5]\d(Z|\+00:00)$" <<< "$timestamp"
|
||||
run grep -E "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T(0[0-9]|[1][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](Z|\+00:00)$" <<< "$timestamp"
|
||||
[[ $status -eq 0 ]]
|
||||
[[ $output == "$timestamp" ]]
|
||||
}
|
1
test/test_helper/bats-assert
Submodule
1
test/test_helper/bats-assert
Submodule
Submodule test/test_helper/bats-assert added at 78fa631d13
1
test/test_helper/bats-support
Submodule
1
test/test_helper/bats-support
Submodule
Submodule test/test_helper/bats-support added at 24a72e1434
Reference in New Issue
Block a user