-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (50 loc) · 3.01 KB
/
Copy pathnightlybuild.yml
File metadata and controls
65 lines (50 loc) · 3.01 KB
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
56
57
58
59
60
61
62
63
64
65
name: Nightly Build
on:
schedule:
- cron: "10 23 * * *"
repository_dispatch:
permissions:
contents: read
issues: write
jobs:
build:
name: "Nightly Build"
env:
ASPNETCORE_ENVIRONMENT: "Production"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
- name: Set Up Variables
run: echo "action_url=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" >> $GITHUB_ENV
- name: Restore Nuget Packages
run: dotnet restore FileProcessor.sln --source ${{ secrets.PUBLICFEEDURL }} --source ${{ secrets.PRIVATEFEED_URL }}
- name: Build Code
run: dotnet build FileProcessor.sln --configuration Release
- name: Run Unit Tests
run: |
echo "ASPNETCORE_ENVIRONMENT are > ${ASPNETCORE_ENVIRONMENT}"
dotnet test "FileProcessor.BusinessLogic.Tests\FileProcessor.BusinessLogic.Tests.csproj" /p:CollectCoverage=true /p:Exclude="[xunit*]*" /p:ExcludeByAttribute="Obsolete" /p:ExcludeByAttribute="GeneratedCodeAttribute" /p:ExcludeByAttribute="CompilerGeneratedAttribute" /p:ExcludeByAttribute="ExcludeFromCodeCoverageAttribute" /p:CoverletOutput="../lcov1.info" /maxcpucount:1 /p:CoverletOutputFormat="lcov"
dotnet test "FileProcessor.FileAggregate.Tests\FileProcessor.FileAggregate.Tests.csproj" /p:CollectCoverage=true /p:Exclude="[xunit*]*" /p:ExcludeByAttribute="Obsolete" /p:ExcludeByAttribute="GeneratedCodeAttribute" /p:ExcludeByAttribute="CompilerGeneratedAttribute" /p:ExcludeByAttribute="ExcludeFromCodeCoverageAttribute" /p:CoverletOutput="../lcov2.info" /maxcpucount:1 /p:CoverletOutputFormat="lcov"
dotnet test "FileProcessor.FileImportLogAggregate.Tests\FileProcessor.FileImportLogAggregate.Tests.csproj" /p:CollectCoverage=true /p:Exclude="[xunit*]*" /p:ExcludeByAttribute="Obsolete" /p:ExcludeByAttribute="GeneratedCodeAttribute" /p:ExcludeByAttribute="CompilerGeneratedAttribute" /p:ExcludeByAttribute="ExcludeFromCodeCoverageAttribute" /p:CoverletOutput="../lcov3.info" /maxcpucount:1 /p:CoverletOutputFormat="lcov"
- name: Build Docker Image
run: docker build . --file FileProcessor/Dockerfile --tag fileprocessor:latest
- name: Run Integration Tests
run: dotnet test "FileProcessor.IntegrationTests\FileProcessor.IntegrationTests.csproj"
- uses: actions/upload-artifact@v4.4.0
with:
name: tracelogs
path: /home/runner/trace/
- name: Notify on nightly failure
if: ${{ failure() }}
uses: TransactionProcessing/org-ci-workflows/.github/actions/nightly-failure-issue@main
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
title: Investigate Nightly Build Failure
labels: nightlybuild
dedupe_key: nightlybuild
body: |
Repo: ${{ github.repository }}
Run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
Commit: ${{ github.sha }}
Workflow: ${{ github.workflow }}
Job: ${{ github.job }}