-
-
Notifications
You must be signed in to change notification settings - Fork 10
51 lines (44 loc) · 1.32 KB
/
ci-build.yml
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
40
41
42
43
44
45
46
47
48
49
50
51
name: 'Build and Test'
on:
push:
pull_request:
branches: [ main ]
release:
types:
- published
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
# Project name to pack and publish
PROJECT_NAME: GeoJSON.Text
jobs:
build:
name: 'Build and Test'
runs-on: windows-2019
env:
VSTEST_CONNECTION_TIMEOUT: 900
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.0.x
8.0.x
- name: Install dependencies
run: dotnet restore src/${{ env.PROJECT_NAME }}.sln
- name: Build solution
run: dotnet build src/${{ env.PROJECT_NAME }}.sln -c Release --no-restore
- name: Test
run: dotnet test src/${{ env.PROJECT_NAME }}.sln -c Release --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:CoverletOutput=../coverage/
- uses: codecov/codecov-action@v4
if: github.ref == 'refs/heads/main'
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: src/coverage
flags: unittests
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: nupkg
path: src/${{ env.PROJECT_NAME }}/bin/Release/*.nupkg