diff --git a/.github/workflows/gateway-fc-util-go.yml b/.github/workflows/gateway-fc-util-go.yml new file mode 100644 index 00000000..35d7a60a --- /dev/null +++ b/.github/workflows/gateway-fc-util-go.yml @@ -0,0 +1,42 @@ +name: Go CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] +defaults: + run: + shell: bash + working-directory: alibabacloud-gateway-fc/util/golang + +jobs: + + build: + name: alibabacloud-gateway-fc-util + runs-on: ubuntu-latest + strategy: + matrix: + go: [1.10.x, 1.11.x, 1.12.x, 1.13.x, 1.14.x, 1.15.x, 1.16.x] + + steps: + - name: Set up Go 1.x + uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.go }} + + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + + - name: Build + run: go build ./client + + - name: Test + run: go test -race -coverprofile=coverage.txt -covermode=atomic ./client/.. + env: + ak: ${{ secrets.ak }} + sk: ${{ secrets.sk }} + url: ${{ secrets.url }} + + - name: CodeCov + run: bash <(curl -s https://codecov.io/bash) -cF golang \ No newline at end of file diff --git a/.github/workflows/gateway-fc-util-python3.yml b/.github/workflows/gateway-fc-util-python3.yml new file mode 100644 index 00000000..6ffb7cbb --- /dev/null +++ b/.github/workflows/gateway-fc-util-python3.yml @@ -0,0 +1,38 @@ +name: Python3 CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] +defaults: + run: + shell: bash + working-directory: alibabacloud-gateway-fc/util/python + +jobs: + + build: + name: alibabacloud-gateway-fc-util + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.6, 3.7, 3.8, 3.9] + + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: pip install alibabacloud-credentials requests coverage pytest + - name: Test with unittest + run: | + coverage run --source="./alibabacloud_gateway_fc_util" -m pytest tests/*_test.py + env: + ak: ${{ secrets.ak }} + sk: ${{ secrets.sk }} + url: ${{ secrets.url }} + - name: CodeCov + run: bash <(curl -s https://codecov.io/bash) -cF python \ No newline at end of file