Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
21 changes: 20 additions & 1 deletion .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ jobs:
- name: Checkout code
uses: actions/checkout@v6

- name: Get Short SHA
id: vars
run: echo "sha_short=$(echo ${{ github.sha }} | cut -c1-7)" >> $GITHUB_OUTPUT

- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
Expand All @@ -38,12 +42,27 @@ jobs:
- name: Build
run: dotnet build --no-restore --configuration Release src/ByteAether.Ulid.sln

- name: Upload DLLs
uses: actions/upload-artifact@v6
with:
name: dlls-${{ steps.vars.outputs.sha_short }}
path: ./**/ByteAether.Ulid/bin/**/*.dll

- name: Run tests
continue-on-error: true
run: dotnet test --no-build --verbosity normal --logger "trx" --configuration Release src/ByteAether.Ulid.sln

- name: Upload test results
uses: actions/upload-artifact@v6
with:
name: test-results
name: test-results-${{ steps.vars.outputs.sha_short }}
path: ./**/TestResults/**/*.trx

- name: Pack
run: dotnet pack --configuration Release /p:ContinuousIntegrationBuild=true /p:PackageVersion=0.0.0-ci-${{ steps.vars.outputs.sha_short }} /p:PackageReleaseNotes="CI Build ${{ steps.vars.outputs.sha_short }}" --output ./output src/ByteAether.Ulid/ByteAether.Ulid.csproj

- name: Upload NuGet package
uses: actions/upload-artifact@v6
with:
name: nugets-${{ steps.vars.outputs.sha_short }}
path: ./output/*.nupkg
4 changes: 2 additions & 2 deletions src/ByteAether.Ulid.Tests/Ulid.New.Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ public class UlidNewTests
/// <summary>
/// A controllable random provider for testing purposes. It returns pre-configured byte sequences.
/// </summary>
private class ControllableRandomProvider(params byte[][] ByteSequences) : IRandomProvider
private class ControllableRandomProvider(params byte[][] byteSequences) : IRandomProvider
{
private readonly Queue<byte[]> _byteSequences = new(ByteSequences);
private readonly Queue<byte[]> _byteSequences = new(byteSequences);

public void GetBytes(Span<byte> buffer)
{
Expand Down