Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
oskogstad committed Feb 26, 2025
1 parent e3f12d5 commit d7e5b1d
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 2 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/workflow-build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,20 @@ on:
workflow_call:

jobs:
check-for-changes:
name: Check for changes
uses: ./.github/workflows/workflow-check-for-changes.yml

check-refitter-swagger-sync:
if: ${{ needs.check-for-changes.outputs.hasSwaggerSchemaChanges == 'true' && needs.check-for-changes.outputs.hasWebApiClientRefitterInterfaceChanges != 'true' }}
runs-on: ubuntu-latest
name: Check refitter swagger sync
continue-on-error: true
steps:
- name: Print message
run: |
echo "::error:: OpenAPI spec has changed, but the WebAPI SDK Refitter interface has not, forgot to rebuild WebAPI?" && exit 1
build-and-test:
runs-on: ubuntu-latest
steps:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/workflow-check-for-changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ on:
hasWebApiClientChanges:
description: "WebApiClient related files changed"
value: ${{ jobs.check-for-changes.outputs.hasWebApiClientChanges }}
hasWebApiClientRefitterInterfaceChanges:
description: "Refitter interface changed"
value: ${{ jobs.check-for-changes.outputs.hasWebApiClientRefitterInterfaceChanges }}
hasTestChanges:
description: "Test related files changed"
value: ${{ jobs.check-for-changes.outputs.hasTestChanges }}
Expand Down Expand Up @@ -51,6 +54,7 @@ jobs:
hasSwaggerSchemaChanges: ${{ steps.filter-backend.outputs.swagger_schema_any_modified == 'true'}}
hasGqlSchemaChanges: ${{ steps.filter-backend.outputs.gql_schema_any_modified == 'true'}}
hasMigrationChanges: ${{ steps.filter-backend.outputs.migration_any_modified == 'true'}}
hasWebApiClientRefitterInterfaceChanges: ${{ steps.filter-backend.outputs.web_api_client_refitter_interface_any_modified == 'true'}}
hasWebApiClientChanges: ${{ steps.filter-backend.outputs.web_api_client_any_modified == 'true'}}
steps:
- name: Checkout
Expand Down Expand Up @@ -83,6 +87,8 @@ jobs:
- '.azure/modules/containerApp/**/*'
tests:
- 'tests/**/*'
web_api_client_refitter_interface:
- 'src/Digdir.Library.Dialogporten.WebApiClient/Features/V1/RefitterInterface.cs'
web_api_client:
- 'src/Digdir.Library.Dialogporten.WebApiClient/**/*'
swagger_schema:
Expand Down
2 changes: 1 addition & 1 deletion docs/schema/V1/swagger.verified.json
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@
"type": "string"
},
"value": {
"description": "A list of localizations for the content.",
"description": "A list of localizations for the content some change!",
"items": {
"$ref": "#/components/schemas/V1CommonLocalizations_Localization"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Digdir.Domain.Dialogporten.Application.Features.V1.Common.Content;
public sealed class ContentValueDto
{
/// <summary>
/// A list of localizations for the content.
/// A list of localizations for the content some change!
/// </summary>
public List<LocalizationDto> Value { get; set; } = [];

Expand Down

0 comments on commit d7e5b1d

Please sign in to comment.