2023-01-31 22:17:08 +08:00
|
|
|
name: Build project
|
2021-04-21 16:30:46 +08:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2023-01-27 16:36:26 +08:00
|
|
|
- master
|
2021-04-21 16:30:46 +08:00
|
|
|
- main
|
|
|
|
|
|
|
|
jobs:
|
2023-01-25 13:42:42 +08:00
|
|
|
build:
|
2021-04-21 16:30:46 +08:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
2023-01-27 16:36:26 +08:00
|
|
|
- uses: actions/checkout@v3
|
2021-04-21 16:30:46 +08:00
|
|
|
|
2022-11-09 13:55:25 +08:00
|
|
|
- name: Setup .NET Core 7
|
2021-09-26 10:10:21 +08:00
|
|
|
uses: actions/setup-dotnet@v1
|
|
|
|
with:
|
2022-11-09 13:55:25 +08:00
|
|
|
dotnet-version: 7.0.x
|
2021-04-21 16:30:46 +08:00
|
|
|
|
|
|
|
- name: Build
|
|
|
|
env:
|
|
|
|
NUGET_API_KEY: ${{secrets.NUGET_API_KEY}}
|
2021-09-26 10:10:21 +08:00
|
|
|
Bundle: True
|
2021-04-21 16:30:46 +08:00
|
|
|
run: |
|
|
|
|
dotnet restore src/BootstrapBlazor --no-cache
|
|
|
|
dotnet build src/BootstrapBlazor
|
2021-11-30 00:49:13 +08:00
|
|
|
|
|
|
|
- name: Test
|
|
|
|
run: |
|
2023-01-22 18:34:48 +08:00
|
|
|
dotnet test test/UnitTest -c Release --collect:"XPlat Code Coverage"
|
2021-11-30 00:49:13 +08:00
|
|
|
|
|
|
|
- name: Upload to Codecov
|
2023-01-21 01:54:05 +08:00
|
|
|
uses: codecov/codecov-action@v3
|
2021-11-30 00:49:13 +08:00
|
|
|
with:
|
|
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|