Skip to content

Commit 6655f3f

Browse files
committed
NO-JIRA Configure CI
1 parent cb2eeae commit 6655f3f

4 files changed

Lines changed: 64 additions & 24 deletions

File tree

.github/workflows/build.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Build and Test
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
build-and-test:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
17+
- name: Setup .NET
18+
uses: actions/setup-dotnet@v4
19+
with:
20+
dotnet-version: '9.0.x'
21+
22+
- name: Start ActiveMQ with Docker Compose
23+
run: docker compose up -d activemq
24+
25+
- name: Restore dependencies
26+
run: dotnet restore nms-openwire.sln
27+
28+
- name: Build solution
29+
run: dotnet build nms-openwire.sln --configuration Release --no-restore
30+
31+
- name: Run tests
32+
run: dotnet test test/nms-openwire-test.csproj --configuration Release --no-build --verbosity normal --logger trx --results-directory TestResults --filter "TestCategory!=Manual"
33+
env:
34+
NMSTestBroker: localhost
35+
36+
- name: Upload test results
37+
uses: actions/upload-artifact@v4
38+
if: always()
39+
with:
40+
name: test-results
41+
path: TestResults/*.trx
42+
43+
- name: Stop ActiveMQ
44+
if: always()
45+
run: docker compose down

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,5 @@ nms.sln.startup.json
1818
build/
1919
package/
2020
nms.sln.DotSettings.user
21-
tools/
21+
tools/
22+
.DS_Store

docker-compose.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
services:
2+
activemq:
3+
image: apache/activemq-classic:latest
4+
ports:
5+
- "61616:61616"
6+
- "8161:8161"
7+
healthcheck:
8+
test: ["CMD", "curl", "-f", "http://localhost:8161/admin/"]
9+
interval: 30s
10+
timeout: 10s
11+
retries: 5
12+
start_period: 60s
13+
environment:
14+
- ACTIVEMQ_ADMIN_LOGIN=admin
15+
- ACTIVEMQ_ADMIN_PASSWORD=admin

test/nms-openwire-test.csproj

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,15 @@
44
<RootNamespace>Apache.NMS.ActiveMQ.Test</RootNamespace>
55
<AssemblyName>Apache.NMS.ActiveMQ.Test</AssemblyName>
66
<ApplicationIcon />
7-
<OutputType>Library</OutputType>
8-
<StartupObject />
97
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
108
<Company>Apache Software Foundation</Company>
119
<Authors>Apache ActiveMQ</Authors>
1210
<Product>Apache NMS OpenWire Test</Product>
1311
<Description>Apache NMS (.Net Standard Messaging Library) Test Suite</Description>
14-
<Copyright>Copyright (C) 2005-2023 Apache Software Foundation</Copyright>
15-
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
16-
<PackageProjectUrl>https://activemq.apache.org/components/nms/</PackageProjectUrl>
17-
<PackageIcon>activemq_logo_icon.png</PackageIcon>
18-
<RepositoryUrl>https://github.com/apache/activemq-nms-openwire</RepositoryUrl>
19-
<RepositoryType>git</RepositoryType>
20-
<PackageTags>apache;activemq;nms;api;net;test;messaging</PackageTags>
21-
<Version>2.0.0</Version>
2212
<SignAssembly>true</SignAssembly>
2313
<AssemblyOriginatorKeyFile>NMSKey.snk</AssemblyOriginatorKeyFile>
2414
<LangVersion>8</LangVersion>
25-
<TargetFrameworks>net472;netcoreapp3.1</TargetFrameworks>
15+
<TargetFramework>net9.0</TargetFramework>
2616
</PropertyGroup>
2717

2818
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
@@ -40,11 +30,7 @@
4030
<PackageReference Include="NUnit3TestAdapter" Version="3.13.0" />
4131
<PackageReference Include="System.Data.SqlClient" Version="4.6.1" />
4232
</ItemGroup>
43-
44-
<ItemGroup Condition=" '$(TargetFramework)' == 'net462'">
45-
<Reference Include="System.Web" />
46-
</ItemGroup>
47-
33+
4834
<ItemGroup>
4935
<ProjectReference Include="..\src\nms-openwire.csproj" />
5036
</ItemGroup>
@@ -55,13 +41,6 @@
5541
</Reference>
5642
</ItemGroup>
5743

58-
<ItemGroup>
59-
<None Include="..\LICENSE.txt">
60-
<Pack>True</Pack>
61-
<PackagePath></PackagePath>
62-
</None>
63-
</ItemGroup>
64-
6544
<ItemGroup>
6645
<None Update="nmsprovider-test.config">
6746
<CopyToOutputDirectory>Always</CopyToOutputDirectory>

0 commit comments

Comments
 (0)