Skip to content

Commit

Permalink
add codecov uploader
Browse files Browse the repository at this point in the history
  • Loading branch information
JacksonTian authored and yndu13 committed May 29, 2024
1 parent 3597cc1 commit 2fc1b2d
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 6 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,9 @@ 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
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
7 changes: 6 additions & 1 deletion .github/workflows/java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,9 @@ 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
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
7 changes: 6 additions & 1 deletion .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,9 @@ 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
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
7 changes: 6 additions & 1 deletion .github/workflows/ts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,9 @@ 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
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
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 2fc1b2d

Please sign in to comment.