Skip to content

Commit 42a1018

Browse files
committed
add Action
1 parent 99d2242 commit 42a1018

File tree

2 files changed

+72
-0
lines changed

2 files changed

+72
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Go CI
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
defaults:
9+
run:
10+
shell: bash
11+
working-directory: alibabacloud-gateway-fc/util/golang
12+
13+
jobs:
14+
15+
build:
16+
name: alibabacloud-gateway-fc-util Golang
17+
runs-on: ubuntu-latest
18+
strategy:
19+
matrix:
20+
go: [1.10.x, 1.11.x, 1.12.x, 1.13.x, 1.14.x, 1.15.x, 1.16.x]
21+
22+
steps:
23+
- name: Set up Go 1.x
24+
uses: actions/setup-go@v2
25+
with:
26+
go-version: ${{ matrix.go }}
27+
28+
- name: Check out code into the Go module directory
29+
uses: actions/checkout@v2
30+
31+
- name: Build
32+
run: go build ./client
33+
34+
- name: Test
35+
run: go test -race -coverprofile=coverage.txt -covermode=atomic ./client/...
36+
37+
- name: CodeCov
38+
run: bash <(curl -s https://codecov.io/bash) -cF golang
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Python3 CI
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
defaults:
9+
run:
10+
shell: bash
11+
working-directory: alibabacloud-gateway-fc/util/python
12+
13+
jobs:
14+
15+
build:
16+
name: alibabacloud-gateway-fc-util Python3
17+
runs-on: ubuntu-latest
18+
strategy:
19+
matrix:
20+
python-version: [3.6, 3.7, 3.8, 3.9]
21+
22+
steps:
23+
- uses: actions/checkout@v2
24+
- name: Set up Python ${{ matrix.python-version }}
25+
uses: actions/setup-python@v2
26+
with:
27+
python-version: ${{ matrix.python-version }}
28+
- name: Install dependencies
29+
run: pip install alibabacloud-credentials requests coverage pytest
30+
- name: Test with unittest
31+
run: |
32+
coverage run --source="./alibabacloud_gateway_fc_util" -m pytest tests/*_test.py
33+
- name: CodeCov
34+
run: bash <(curl -s https://codecov.io/bash) -cF python

0 commit comments

Comments
 (0)