Skip to content

workflow changes

workflow changes #213

Workflow file for this run

name: Build and Test Pull Requests
on:
pull_request:
branches:
- main
jobs:
build:
name: "Build and Test Pull Requests"
env:
ASPNETCORE_ENVIRONMENT: "Production"
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Install NET 9
uses: actions/[email protected]
with:
dotnet-version: '9.0.x'
- name: Echo vars
run: |
echo "CI is > ${CI}"
echo "HOME is > ${HOME}"
- 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"
dotnet test "FileProcessor.FileAggregate.Tests\FileProcessor.FileAggregate.Tests.csproj"
dotnet test "FileProcessor.FileImportLogAggregate.Tests\FileProcessor.FileImportLogAggregate.Tests.csproj"
- 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" --filter Category=PRTest
- uses: actions/[email protected]
if: ${{ failure() }}
with:
name: tracelogs
path: /home/txnproc/trace/