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
10 changes: 10 additions & 0 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"version": 1,
"isRoot": true,
"tools": {
"csharpier": {
"version": "1.2.6",
"commands": ["csharpier"]
}
}
}
2 changes: 2 additions & 0 deletions .csharpierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# EF Core generated migrations and model snapshots.
**/Migrations/**
26 changes: 23 additions & 3 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,24 @@
on:
push:
branches: [ main ]
paths: [ 'src/**', 'tests/**' ]
paths:
- 'src/**'
- 'tests/**'
- 'samples/**'
- '.config/dotnet-tools.json'
- '.csharpierrc'
- '.csharpierignore'
- '.github/workflows/verify.yml'
pull_request:
branches: [ main ]
paths: [ 'src/**', 'tests/**' ]
paths:
- 'src/**'
- 'tests/**'
- 'samples/**'
- '.config/dotnet-tools.json'
- '.csharpierrc'
- '.csharpierignore'
- '.github/workflows/verify.yml'
workflow_dispatch:
workflow_call:

Expand All @@ -27,6 +41,12 @@ jobs:
cache: true
cache-dependency-path: '**/packages.lock.json'

- name: Restore .NET tools
run: dotnet tool restore

- name: Check formatting
run: dotnet csharpier check .

- name: Restore dependencies
run: dotnet restore --locked-mode

Expand Down Expand Up @@ -60,4 +80,4 @@ jobs:
if: github.event_name == 'pull_request'
with:
recreate: true
path: code-coverage-results.md
path: code-coverage-results.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,7 @@ public async Task UpdateJobsAsync(IEnumerable<AtomizerJob> jobs, CancellationTok
_dbContext.ChangeTracker.Clear();

var newErrors = new List<AtomizerJobErrorEntity>();
var jobEntities = jobs
.Select(j =>
var jobEntities = jobs.Select(j =>
{
var entity = j.ToEntity();
// Errors loaded via GetDueJobsAsync are always empty (no .Include); any errors
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,10 @@ public async Task UpdateJobsAsync_WhenJobHasNewErrors_ShouldPersistErrorsWithout
await act.Should().NotThrowAsync();

// Assert — error was persisted
var errors = await dbContext.Set<AtomizerJobErrorEntity>().Where(e => e.JobId == job.Id).ToListAsync(TestContext.Current.CancellationToken);
var errors = await dbContext
.Set<AtomizerJobErrorEntity>()
.Where(e => e.JobId == job.Id)
.ToListAsync(TestContext.Current.CancellationToken);
errors.Should().ContainSingle();
errors[0].ErrorMessage.Should().Contain("boom");
}
Expand Down
Loading