Files
dotnet-qc/action.yml
T

27 lines
670 B
YAML

name: 'DOTNET QC'
description: '品質檢查 .NET 套件'
author: 'Jeffery'
runs:
using: 'composite'
steps:
- name: 取得專案
uses: actions/checkout@v6
- name: 快取 NuGet 套件
id: cache-nuget
uses: https://gitea.jsc.idv.tw/actions/cache-nuget@v0.0.3
- name: 復原專案
if: steps.cache-nuget.outputs.cache-hit != 'true'
run: |
if [[ -f "nuget.config" ]]; then
dotnet restore --configfile nuget.config
else
dotnet restore
fi
shell: bash
- name: 建置專案
run: dotnet build --no-restore
shell: bash
- name: 測試專案
run: dotnet test --no-restore --no-build
shell: bash