Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0: Windows GHA builds #1054

Merged
merged 30 commits into from
Oct 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
afe4f87
Basic Windows build
rasmus Oct 19, 2024
3e9e6c5
Use latest versions of actions
rasmus Oct 19, 2024
16cac03
Doh, remember to save the file
rasmus Oct 19, 2024
552a255
Install .NET 8 as well
rasmus Oct 19, 2024
24cea6b
Try the services
rasmus Oct 19, 2024
30cb643
Use new compose method instead
rasmus Oct 19, 2024
3b1b6b3
Make script fail
rasmus Oct 19, 2024
15cbe1f
Try this to properly fail
rasmus Oct 19, 2024
91d6152
Run on custom runner
rasmus Oct 19, 2024
1afdac6
Convert to PowerShell
rasmus Oct 19, 2024
a57f583
Try this instead
rasmus Oct 19, 2024
fc18e1b
Run Bake
rasmus Oct 19, 2024
4598b9b
Minimum upgrade of packages with vulnerabilities
rasmus Oct 20, 2024
66e3355
Force recreate the containers
rasmus Oct 20, 2024
a4e4254
Add MSSQL to the services as well
rasmus Oct 20, 2024
d077174
Add missing services
rasmus Oct 20, 2024
81ac97b
Place --force-recreate differently
rasmus Oct 20, 2024
67df5e2
Remove old CI setup files
rasmus Oct 20, 2024
5f004f4
Fix PostgreSQL user/pass
rasmus Oct 20, 2024
6fd2750
try this
rasmus Oct 20, 2024
5872d53
Set missing ENVs
rasmus Oct 20, 2024
5674dc9
Fix test
rasmus Oct 20, 2024
2acd5aa
Remove all containers
rasmus Oct 20, 2024
0743d84
Force it
rasmus Oct 20, 2024
14e547a
Ignore flacky test
rasmus Oct 20, 2024
6e10dd7
Updated release notes
rasmus Oct 20, 2024
2ccf049
Cleanup build
rasmus Oct 20, 2024
de72598
Prettify workflow
rasmus Oct 20, 2024
2a8f647
Setup release process for v0
rasmus Oct 20, 2024
42e30db
Let Bake know to actually pack the packages
rasmus Oct 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .github/workflows/pull-requests-v0.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# https://github.com/eventflow/EventFlow/pull/967

name: pull-requests

on:
push:
branches: [ develop-v0 ]
pull_request:
branches: [ develop-v0 ]

jobs:
build:
runs-on: [self-hosted, windows-10]
env:
HELPZ_POSTGRESQL_USER: postgres
HELPZ_POSTGRESQL_PASS: Password12!
EVENTFLOW_MSSQL_SERVER: 127.0.0.1,1433
EVENTFLOW_MSSQL_USER: sa
EVENTFLOW_MSSQL_PASS: Password12!
RABBITMQ_URL: "amqp://guest:guest@localhost:5672"
EVENTSTORE_URL: "tcp://admin:changeit@localhost:1113"
ELASTICSEARCH_URL: "http://localhost:9200"

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Start containers used by integration tests
run: |
powershell -NoProfile -ExecutionPolicy unrestricted -Command ".\up-integration-environment.ps1"

- name: Run Bake
run: |
bake run --build-version 0.84.${{ github.run_number }}

- name: Upload NuGet packages
uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: packages
path: "**/*nupkg"
if-no-files-found: error

- name: Upload test results
uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: test-results
path: "**/*.trx"
if-no-files-found: error
56 changes: 56 additions & 0 deletions .github/workflows/release-v0.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# https://github.com/eventflow/EventFlow/pull/967

name: release-v0

on:
push:
branches: [ release-v0 ]

jobs:
build:
runs-on: [self-hosted, windows-10]

environment:
name: release

env:
HELPZ_POSTGRESQL_USER: postgres
HELPZ_POSTGRESQL_PASS: Password12!
EVENTFLOW_MSSQL_SERVER: 127.0.0.1,1433
EVENTFLOW_MSSQL_USER: sa
EVENTFLOW_MSSQL_PASS: Password12!
RABBITMQ_URL: "amqp://guest:guest@localhost:5672"
EVENTSTORE_URL: "tcp://admin:changeit@localhost:1113"
ELASTICSEARCH_URL: "http://localhost:9200"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NUGET_APIKEY: ${{ secrets.NUGET_APIKEY }}

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Start containers used by integration tests
run: |
powershell -NoProfile -ExecutionPolicy unrestricted -Command ".\up-integration-environment.ps1"

- name: Run Bake
run: |
declare -i REVISION
REVISION=4714+$GITHUB_RUN_NUMBER
bake run --convention=Release --build-version 0.84.$REVISION --destination="nuget>github,nuget,release>github"

- name: Upload NuGet packages
uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: packages
path: "**/*nupkg"
if-no-files-found: error

- name: Upload test results
uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: test-results
path: "**/*.trx"
if-no-files-found: error
7 changes: 6 additions & 1 deletion RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
### New in 0.84 (not released yet)

* _Nothing yet_
Maintenance release of EventFlow v0 that fixes a few issues and updates dependencies. The update tries to stay as close to the old code base as possible. However, many dependencies have critical vulnerabilities have forced an update. This in turn has again force update on the .NET Framework version for some packages, as the updated dependencies did not support the old ones.

* Breaking: Updated `Npgsql` from `4.0.2` to `4.1.14` due to critical vulnerability, which have forced `EventFlow.PostgreSql` to from `net452` to `net472`
* Fix: Updated `System.Data.SqlClient` from `4.3.0` to `4.8.6` due to critical vulnerability
* Fix: Updated `Newtonsoft.Json` from `11.0.2` to `13.0.3` due to critical vulnerability
* Fix: Updated `Microsoft.Owin` from `3.1.0` to `4.2.2` due to critical vulnerability

### New in 0.83.4713 (released 2021-09-07)

Expand Down
1 change: 1 addition & 0 deletions Source/EventFlow.AspNetCore/EventFlow.AspNetCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<NeutralLanguage>en-US</NeutralLanguage>
<PackageReleaseNotes>UPDATED BY BUILD</PackageReleaseNotes>
<IsPackable>true</IsPackable>
</PropertyGroup>

<ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions Source/EventFlow.Autofac/EventFlow.Autofac.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<NeutralLanguage>en-US</NeutralLanguage>
<PackageReleaseNotes>UPDATED BY BUILD</PackageReleaseNotes>
<IsPackable>true</IsPackable>
</PropertyGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net452'">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<NeutralLanguage>en-US</NeutralLanguage>
<PackageReleaseNotes>UPDATED BY BUILD</PackageReleaseNotes>
<IsPackable>true</IsPackable>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<NeutralLanguage>en-US</NeutralLanguage>
<PackageReleaseNotes>UPDATED BY BUILD</PackageReleaseNotes>
<IsPackable>true</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
<PackageReference Include="NEST" Version="7.8.2" />
<PackageReference Include="newtonsoft.json" Version="11.0.2" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="3.1.5" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.1.5" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
<PackageReference Include="Npgsql" Version="4.1.3.1" />
<PackageReference Include="Npgsql" Version="4.1.14" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="3.1.4" />
<PackageReference Include="NUnit" Version="3.12.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.17.0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<NeutralLanguage>en-US</NeutralLanguage>
<PackageReleaseNotes>UPDATED BY BUILD</PackageReleaseNotes>
<IsPackable>true</IsPackable>
</PropertyGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<NeutralLanguage>en-US</NeutralLanguage>
<PackageReleaseNotes>UPDATED BY BUILD</PackageReleaseNotes>
<IsPackable>true</IsPackable>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Source/EventFlow.Hangfire/EventFlow.Hangfire.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<NeutralLanguage>en-US</NeutralLanguage>
<PackageReleaseNotes>UPDATED BY BUILD</PackageReleaseNotes>
<IsPackable>true</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Hangfire.Core" Version="1.6.20" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
<PackageReference Include="newtonsoft.json" Version="11.0.2" />
</ItemGroup>

<ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions Source/EventFlow.MongoDB/EventFlow.MongoDB.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
<PackageTags>CQRS ES event sourcing MongoDB</PackageTags>
<PackageReleaseNotes>UPDATED BY BUILD</PackageReleaseNotes>
<IsPackable>true</IsPackable>
</PropertyGroup>

<ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions Source/EventFlow.MsSql/EventFlow.MsSql.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<NeutralLanguage>en-US</NeutralLanguage>
<PackageReleaseNotes>UPDATED BY BUILD</PackageReleaseNotes>
<IsPackable>true</IsPackable>
</PropertyGroup>

<ItemGroup>
Expand Down
6 changes: 4 additions & 2 deletions Source/EventFlow.Owin.Tests/EventFlow.Owin.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@
<Folder Include="Properties\" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Autofac.WebApi2" Version="4.0.0" />
<PackageReference Include="Autofac.WebApi2.Owin" Version="4.0.0" />
<PackageReference Include="Autofac.WebApi2" Version="5.0.0" />
<PackageReference Include="Autofac.WebApi2.Owin" Version="5.0.0" />
<PackageReference Include="Microsoft.Owin" Version="4.2.2" />
<PackageReference Include="Microsoft.AspNet.WebApi.Core" Version="5.2.3" />
<PackageReference Include="Microsoft.AspNet.WebApi.OwinSelfHost" Version="5.2.3" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
<PackageReference Include="Microsoft.Owin.Host.HttpListener" Version="3.1.0" />
<PackageReference Include="Microsoft.Owin.Hosting" Version="3.1.0" />
Expand Down
3 changes: 2 additions & 1 deletion Source/EventFlow.Owin/EventFlow.Owin.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<NeutralLanguage>en-US</NeutralLanguage>
<PackageReleaseNotes>UPDATED BY BUILD</PackageReleaseNotes>
<IsPackable>true</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Owin" Version="3.1.0" />
<PackageReference Include="Microsoft.Owin" Version="4.2.2" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
<PackageReference Include="Npgsql" Version="4.0.2" />
<PackageReference Include="NUnit" Version="3.12.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.17.0" />
</ItemGroup>
Expand Down
5 changes: 3 additions & 2 deletions Source/EventFlow.PostgreSql/EventFlow.PostgreSql.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../Common.props" />
<PropertyGroup>
<TargetFrameworks>net452;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net472;netstandard2.0</TargetFrameworks>
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
<GenerateAssemblyInfo>True</GenerateAssemblyInfo>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
Expand All @@ -18,6 +18,7 @@
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<NeutralLanguage>en-US</NeutralLanguage>
<PackageReleaseNotes>UPDATED BY BUILD</PackageReleaseNotes>
<IsPackable>true</IsPackable>
</PropertyGroup>

<ItemGroup>
Expand All @@ -35,7 +36,7 @@
<ItemGroup>
<PackageReference Include="dbup-postgresql" Version="4.1.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
<PackageReference Include="Npgsql" Version="4.0.2" />
<PackageReference Include="Npgsql" Version="4.1.14" />
</ItemGroup>

<ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions Source/EventFlow.RabbitMQ/EventFlow.RabbitMQ.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<NeutralLanguage>en-US</NeutralLanguage>
<PackageReleaseNotes>UPDATED BY BUILD</PackageReleaseNotes>
<IsPackable>true</IsPackable>
</PropertyGroup>

<ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions Source/EventFlow.SQLite/EventFlow.SQLite.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<NeutralLanguage>en-US</NeutralLanguage>
<PackageReleaseNotes>UPDATED BY BUILD</PackageReleaseNotes>
<IsPackable>true</IsPackable>
</PropertyGroup>

<ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions Source/EventFlow.Sql/EventFlow.Sql.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<NeutralLanguage>en-US</NeutralLanguage>
<PackageReleaseNotes>UPDATED BY BUILD</PackageReleaseNotes>
<IsPackable>true</IsPackable>
</PropertyGroup>

<ItemGroup>
Expand Down
3 changes: 2 additions & 1 deletion Source/EventFlow.TestHelpers/EventFlow.TestHelpers.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<PackageReleaseNotes>UPDATED BY BUILD</PackageReleaseNotes>
<LangVersion>7.1</LangVersion>
<IsTestProject>false</IsTestProject>
<IsPackable>true</IsPackable>
</PropertyGroup>

<ItemGroup>
Expand All @@ -32,7 +33,7 @@
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
<PackageReference Include="Moq" Version="4.7.99" />
<PackageReference Include="NUnit" Version="3.12.0" />
<PackageReference Include="System.Data.SqlClient" Version="4.3.0" />
<PackageReference Include="System.Data.SqlClient" Version="4.8.6" />
<PackageReference Include="Appveyor.TestLogger" Version="2.0.0" PrivateAssets="All" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion Source/EventFlow.Tests/LicenseHeaderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public class LicenseHeaderTests
@"Copyright \(c\) (?<from>20\d{2})\-(?<to>20\d{2}) (?<name>.*)",
RegexOptions.Compiled | RegexOptions.IgnoreCase);

private static readonly int CurrentYear = 2023; // Hardcoded, we don't want test failing every January 1'st
private static readonly int CurrentYear = 2024; // Hardcoded, we don't want test failing every January 1'st
private static readonly int EndYearForPastCopyrightHolders = 2022;

[Test]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ public void DeleteStoreRootDir()

[Test]
[Retry(5)]
[Ignore("This test is flaky and should be rewritten.")]
public void MultipleInstancesWithSamePathFail()
{
// Arrange
Expand Down
3 changes: 2 additions & 1 deletion Source/EventFlow/EventFlow.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
<PackageReleaseNotes>UPDATED BY BUILD</PackageReleaseNotes>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\EventFlow.xml</DocumentationFile>
<NoWarn>1701;1702;1705;1591</NoWarn>
<IsPackable>true</IsPackable>
</PropertyGroup>

<PropertyGroup>
Expand All @@ -29,7 +30,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.CSharp" Version="4.4.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="JetBrains.Annotations" Version="11.0.0">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
Expand Down
Loading