Skip to content

Nightly Build

Nightly Build #1436

Workflow file for this run

name: Nightly Build
on:
schedule:
- cron: "45 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 CallbackHandler.sln --source ${{ secrets.PUBLICFEEDURL }} --source ${{ secrets.PRIVATEFEED_URL }}
- name: Build Code
run: dotnet build CallbackHandler.sln --configuration Release
- name: Run Unit Tests
run: |
echo "ASPNETCORE_ENVIRONMENT are > ${ASPNETCORE_ENVIRONMENT}"
dotnet test "CallbackHandler.BusinessLogic.Tests/CallbackHandler.BusinessLogic.Tests.csproj" --configuration Release --no-build --verbosity normal
dotnet test "CallbackHandler.CallbackMessageAggregate.Tests/CallbackHandler.CallbackMessageAggregate.Tests.csproj" --configuration Release --no-build --verbosity normal
dotnet test "CallbackHandler.Tests/CallbackHandler.Tests.csproj" --configuration Release --no-build --verbosity normal
- name: Build Docker Image
run: docker build . --file CallbackHandler/Dockerfile --tag callbackhandler:latest
- name: Run Integration Tests
run: dotnet test "CallbackHandler.IntegrationTests/CallbackHandler.IntegrationTests.csproj" --configuration Release --no-build --verbosity normal
- 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 }}