-
-
Notifications
You must be signed in to change notification settings - Fork 72
46 lines (40 loc) · 1.22 KB
/
pull_request.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
name: Pull Request
on:
pull_request_target:
branches: [ master ]
jobs:
approve:
runs-on: ubuntu-latest
steps:
- name: Approve
run: echo For security reasons, all pull requests need to be approved first before running any automated CI.
build:
runs-on: ubuntu-latest
needs: [approve]
environment:
name: Integrate Pull Request
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 2
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '7.0.x'
- name: Restore dependencies
run: dotnet restore -s ${MYGET_FEED} -s https://api.nuget.org/v3/index.json
env:
MYGET_FEED: ${{ secrets.MYGET_FEED }}
- name: Build
run: dotnet build --no-restore /p:ContinuousIntegrationBuild=true
- name: Test
run: dotnet test --no-build --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
- name: Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
#- name: Run FOSSA scan
# uses: fossa-contrib/fossa-action@v1
# with:
# fossa-api-key: ${{ secrets.FOSSA_API_KEY }}