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

ci: 更新git action某些文件 #197

Merged
merged 6 commits into from
Dec 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/git-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# .github/workflows/version.yml
name: Git Version

on:
push:
branches:
- master

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }} # checkout the correct branch name
fetch-depth: 0 # fetch the whole repo history

- name: Git Version
id: version
uses: codacy/git-version@2.7.1

- name: Use the version
run: |
echo ${{ steps.version.outputs.version }}
- name: Use the previous version
run: |
echo ${{ steps.version.outputs.previous-version }}
11 changes: 8 additions & 3 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: "PR"

env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

on:
push:
branches: [ "master" ]
Expand All @@ -18,13 +22,14 @@ jobs:
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
uses: codacy/codacy-coverage-reporter-action@v1.3.0
with:
api-token: ${{ secrets.CODACY_ACCOUNT_TOKEN }}
api-token: $CODECOV_TOKEN
coverage-reports: 'coverage.cobertura.xml'
DotNet:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -55,15 +60,15 @@ jobs:
- name: Dotnet Test Reporter
uses: bibipkins/dotnet-test-reporter@v1.0.0-beta.4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
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/pr-comment@v1.0.1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
repo-token: ${{ env.GITHUB_TOKEN }}
message: 查看测试结果 ${{ steps.test-report.outputs.runHtmlUrl }}


21 changes: 0 additions & 21 deletions .github/workflows/release-note-preview.yml

This file was deleted.

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -360,3 +360,5 @@ MigrationBackup/

# Fody - auto-generated XML schema
FodyWeavers.xsd
*.pptx
*.vsdx