Skip to content

Commit

Permalink
Update dotnet-build-test.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Argmaster committed Oct 23, 2024
1 parent d6589ba commit 641cc3b
Showing 1 changed file with 27 additions and 25 deletions.
52 changes: 27 additions & 25 deletions .github/workflows/dotnet-build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ name: .NET Build & Test

on:
push:
branches: [ "main" ]
branches: ["main"]
pull_request:
branches: [ "main" ]
branches: ["main"]

jobs:
build-and-test:
Expand All @@ -22,26 +22,28 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x

- name: Restore dependencies
run:
dotnet restore ./src/Bytom.sln

- name: Build
run:
dotnet build --no-restore ./src/Bytom.sln

- name: Test with coverage
run: dotnet test --no-build --verbosity normal --collect:"XPlat Code Coverage" ./src/Bytom.sln

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
files: ./src/**/coverage.cobertura.xml
fail_ci_if_error: false
- uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x

- name: Restore dependencies
run: dotnet restore ./src/Bytom.sln

- name: Build
run: dotnet build --no-restore ./src/Bytom.sln

- name: Test with coverage
run: dotnet test --no-build --verbosity normal --collect:"XPlat Code Coverage" ./src/Bytom.sln

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
env_vars: OS
files: ./src/**/coverage.cobertura.xml
fail_ci_if_error: false
flags: jest
verbose: true

0 comments on commit 641cc3b

Please sign in to comment.