Skip to content
This repository has been archived by the owner on Jan 5, 2024. It is now read-only.

feat(TUpload): 新增 TUpload 组件 #365

feat(TUpload): 新增 TUpload 组件

feat(TUpload): 新增 TUpload 组件 #365

Workflow file for this run

name: "PR"
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
on:
push:
branches: [ "master","main" ]
pull_request:
branches: [ "master","main" ]
jobs:
Codacy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET Version
uses: actions/setup-dotnet@v2
with:
dotnet-version: |
6.0.x
7.0.x
- name: Build & Test
run: |
echo CODECOV_TOKEN: $CODECOV_TOKEN
dotnet build
dotnet test --collect:"XPlat Code Coverage"
find ./src/TDesign.Test/*TestResults* -name "*coverage*.xml" -type f -exec cp {} ./ \;
- name: Codacy Coverage Reporter
if: github.repository_owner == 'AchievedOwner'
uses: codacy/[email protected]
with:
api-token: $CODECOV_TOKEN
coverage-reports: 'coverage.cobertura.xml'
DotNet:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET Version
uses: actions/setup-dotnet@v2
with:
dotnet-version: |
6.0.x
7.0.x
- name: Build
run: dotnet build
- name: Test
run: dotnet test --logger "trx;LogFileName=test-results.trx" --collect:"XPlat Code Coverage"
- name: Test Reporting
uses: phoenix-actions/test-reporting@v8
id: test-report
if: success() || failure()
with:
name: 'Unit Test'
path: './src/TDesign.Test/TestResults/*'
reporter: 'dotnet-trx'
- name: Generate Report
run: |
echo "url is ${{ steps.test-report.outputs.runHtmlUrl }}"
- name: Dotnet Test Reporter
uses: bibipkins/[email protected]
if: github.repository_owner == 'AchievedOwner'
with:
github-token: ${{ env.GITHUB_TOKEN }}
test-results: ./src/TDesign.Test/TestResults/
test-coverage: ./src/TDesign.Test/TestResults/**/*coverage*.xml
min-coverage: 80
comment-title: 'Unit Test Results'
- name: PR Comment
uses: github-actions-up-and-running/[email protected]
with:
repo-token: ${{ env.GITHUB_TOKEN }}
message: 查看测试结果 ${{ steps.test-report.outputs.runHtmlUrl }}