Skip to content

Updated

Updated #95

name: .NET Core Desktop with Docker
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: windows-latest
env:
Solution_Name: pWord4/pWord4/pWord4.sln
Test_Project_Path: pWord4/pWord4/OpNodeTest2/OpNodeTest2.csproj
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Build Docker image
run: docker build -t my-windows-forms-app .
- name: Run Docker image
run: docker run -d --name my-running-app my-windows-forms-app
- name: List directory inside Docker
run: docker exec my-running-app Get-ChildItem -Path . -Force
- name: List files in OpNodeTest2 directory inside Docker
run: docker exec my-running-app Get-ChildItem -Path ./pWord4/pWord4/OpNodeTest2 -Force
- name: Restore the application inside Docker
run: docker exec my-running-app msbuild ${{ env.Solution_Name }} /t:Restore /p:Configuration=Debug
- name: Run unit tests inside Docker
run: docker exec my-running-app dotnet test ${{ env.Test_Project_Path }}
# ... (any other steps you need)