-
Notifications
You must be signed in to change notification settings - Fork 2
39 lines (30 loc) · 976 Bytes
/
Copy pathci.yml
File metadata and controls
39 lines (30 loc) · 976 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
DOTNET_VERSION: '10.0.x'
SOLUTION_PATH: 'src/TextDiff.Sharp.sln'
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Restore dependencies
run: dotnet restore ${{ env.SOLUTION_PATH }}
- name: Build
run: dotnet build ${{ env.SOLUTION_PATH }} --configuration Release --no-restore
- name: Test with coverage
run: dotnet test ${{ env.SOLUTION_PATH }} --configuration Release --no-build --collect:"XPlat Code Coverage" --results-directory coverage --settings src/coverage.runsettings
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
directory: coverage
fail_ci_if_error: false