-
Notifications
You must be signed in to change notification settings - Fork 3
55 lines (46 loc) · 1.69 KB
/
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
52
53
54
55
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: build
on:
push:
branches: [ "main", "releases/*" ]
pull_request:
branches: [ "main", "releases/*" ]
jobs:
build:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
steps:
- uses: actions/checkout@v3
with:
depth: 0
- uses: actions/setup-java@v4
with:
distribution: 'microsoft'
java-version: '21'
- name: setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: restore dependencies
run: dotnet restore
- name: restore tools
run: dotnet tool restore
- name: Begin SQ-Analysis
if: ${{ github.actor != 'dependabot[bot]' }}
run: dotnet tool run dotnet-sonarscanner begin /k:"earloc_TypealizR" /o:"earloc" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io"
- name: build
run: dotnet build --no-restore
- name: test
run: dotnet test --no-build
- name: end SQ-Analysis
if: ${{ github.actor != 'dependabot[bot]' }}
run: dotnet tool run dotnet-sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}"
- name: publish coverage report to coveralls.io
if: ${{ github.actor != 'dependabot[bot]' }}
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: src/TypealizR.Tests/coverage.info