Add bats to git submodules
This commit is contained in:
parent
72e20be7bb
commit
abc588ed40
|
@ -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
|
||||
|
|
|
@ -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
|
|
@ -0,0 +1 @@
|
|||
Subproject commit e8c840b58f0833e23461c682655fe540aa923f85
|
|
@ -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" ]]
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 78fa631d1370562d2cd4a1390989e706158e7bf0
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 24a72e14349690bcbf7c151b9d2d1cdd32d36eb1
|
Loading…
Reference in New Issue