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 bc370b5
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 2 deletions.
21 changes: 21 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,27 @@ on:
workflow_call:

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

check-refitter-swagger-sync:
needs: [ check-for-changes ]
if: ${{ needs.check-for-changes.outputs.hasSwaggerSchemaChanges == 'true' && needs.check-for-changes.outputs.hasWebApiClientRefitterInterfaceChanges != 'true' }}
runs-on: ubuntu-latest
name: Check refitter swagger sync
steps:
- uses: actions/github-script@v7
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'OpenAPI spec has changed, but the WebAPI SDK Refitter interface has not, did you forget to rebuild WebAPI?'
})
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 bc370b5

Please sign in to comment.