NO-JIRA Configure CI #8
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Test | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '9.0.x' | |
- name: Start ActiveMQ with Docker Compose | |
run: docker compose up -d activemq | |
- name: Restore dependencies | |
run: dotnet restore nms-openwire.sln | |
- name: Build solution | |
run: dotnet build nms-openwire.sln --configuration Release --no-restore | |
- name: Run tests | |
run: dotnet test test/nms-openwire-test.csproj --configuration Release --no-build --verbosity normal --logger trx --results-directory TestResults --filter "TestCategory!=Manual" | |
env: | |
NMSTestBroker: localhost | |
- name: Upload test results | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: test-results | |
path: TestResults/*.trx | |
- name: Stop ActiveMQ | |
if: always() | |
run: docker compose down |