Skip to content

Commit

Permalink
add codecov uploader
Browse files Browse the repository at this point in the history
  • Loading branch information
JacksonTian committed Mar 11, 2024
1 parent c837849 commit 57ba20c
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 6 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,7 @@ jobs:
- name: Build
run: go mod tidy
- name: Test
run: go test -race -coverprofile=coverage.txt -covermode=atomic ./client/...
run: go test -race -coverprofile=coverage.txt -covermode=atomic ./client/...
- uses: codecov/codecov-action@v4
with:
flags: golang # optional
5 changes: 4 additions & 1 deletion .github/workflows/java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,7 @@ jobs:
with:
java-version: ${{ matrix.java }}
- name: Test
run: mvn test -B
run: mvn test -B
- uses: codecov/codecov-action@v4
with:
flags: java # optional
5 changes: 4 additions & 1 deletion .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,7 @@ jobs:
run: pip install alibabacloud-tea coverage pytest alibabacloud-tea-util alibabacloud_credentials alibabacloud_openapi_util alibabacloud_gateway_spi alibabacloud_tea_xml httpretty
- name: Test with unittest
run: |
coverage run --source="./alibabacloud_tea_openapi" -m pytest tests/test_*
coverage run --source="./alibabacloud_tea_openapi" -m pytest tests/test_*
- uses: codecov/codecov-action@v4
with:
flags: python # optional
5 changes: 4 additions & 1 deletion .github/workflows/ts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,7 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm run ci
- run: npm run test-cov
- uses: codecov/codecov-action@v4
with:
flags: typescript # optional
2 changes: 0 additions & 2 deletions ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,13 @@
"scripts": {
"test": "mocha -r ts-node/register -r source-map-support/register test/**/*.spec.ts --timeout=10000",
"test-cov": "nyc -e .ts -r=html -r=text -r=lcov npm run test",
"ci": "npm run test-cov && codecov",
"build": "tsc",
"prepublishOnly": "tsc"
},
"author": "",
"license": "ISC",
"devDependencies": {
"@types/mocha": "^5.2.7",
"codecov": "^3.6.1",
"mocha": "^6.2.0",
"@types/node": "^12.12.26",
"nyc": "^15.0.0",
Expand Down

0 comments on commit 57ba20c

Please sign in to comment.