Skip to content

Commit

Permalink
Merge branch 'develop' into chore/complex-form-type-validation
Browse files Browse the repository at this point in the history
# Conflicts:
#	backend/FwLite/FwDataMiniLcmBridge/Api/FwDataMiniLcmApi.cs
  • Loading branch information
hahn-kev committed Nov 29, 2024
2 parents 97ae8ab + ada6d56 commit 02d0e3e
Show file tree
Hide file tree
Showing 98 changed files with 1,953 additions and 468 deletions.
7 changes: 4 additions & 3 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
"isRoot": true,
"tools": {
"dotnet-ef": {
"version": "8.0.10",
"version": "9.0.0",
"commands": [
"dotnet-ef"
]
],
"rollForward": false
}
}
}
}
12 changes: 8 additions & 4 deletions .github/workflows/fw-lite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,14 @@ jobs:
submodules: true
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.x'
dotnet-version: '9.x'
- uses: actions/setup-node@v4
with:
node-version-file: './frontend/package.json'

- name: Setup Maui
run: dotnet workload install maui-windows

- name: Set Version
id: setVersion
shell: bash
Expand Down Expand Up @@ -86,7 +90,7 @@ jobs:
path: frontend/viewer/dist
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.x'
dotnet-version: '9.x'

- name: Dotnet build
working-directory: backend/FwLite/LocalWebApp
Expand Down Expand Up @@ -123,7 +127,7 @@ jobs:
path: frontend/viewer/dist
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.x'
dotnet-version: '9.x'

- name: Dotnet build
working-directory: backend/FwLite/LocalWebApp
Expand Down Expand Up @@ -156,7 +160,7 @@ jobs:
path: frontend/viewer/dist
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.x'
dotnet-version: '9.x'

- name: Setup Maui
run: dotnet workload install maui-windows
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/integration-test-gha.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.x'
- name: Install Task
uses: arduino/setup-task@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/integration-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ jobs:
env:
DOTNET_INSTALL_DIR: ${{ inputs.runs-on == 'self-hosted' && '/opt/hostedtoolcache/dotnet' || '' }} #poor man's conditional
with:
dotnet-version: '8.x'
dotnet-version: '9.x'
- uses: MatteoH2O1999/setup-python@429b7dee8a48c31eb72ce0b420ea938ff51c2f11 # v3.2.1
id: python
if: ${{ inputs.runs-on != 'windows-latest' && !env.act && inputs.hg-version == '3' }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lexbox-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
submodules: true
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.x'
dotnet-version: '9.x'
- name: Install Task
uses: arduino/setup-task@v2
with:
Expand Down
7 changes: 6 additions & 1 deletion Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,12 @@ tasks:
cmds:
- tilt up

# dev
prod-ui-up:
interactive: true
desc: 'Starts the cluster using the production build of UI, good for automated testing'
cmds:
- tilt up -- --prod-ui-build
# dev
infra-up:
desc: 'Starts infrastructure for our ui and api, does not forward ports for api, if you want port forwarding use k8s:infra-forward'
cmds:
Expand Down
29 changes: 19 additions & 10 deletions Tiltfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
version_settings(constraint='>=0.33.20')
secret_settings(disable_scrub=True)
config.define_bool("lexbox-api-local")
config.define_bool("prod-ui-build")
cfg = config.parse()
forward_lexbox = not cfg.get("lexbox-api-local", False)
prod_ui_build = cfg.get("prod-ui-build", False)

docker_build(
'local-dev-init',
Expand Down Expand Up @@ -33,16 +35,23 @@ docker_build(
sync('backend', '/src/backend')
]
)

docker_build(
'ghcr.io/sillsdev/lexbox-ui',
context='frontend',
dockerfile='./frontend/dev.Dockerfile',
only=['.'],
live_update=[
sync('frontend', '/app'),
]
)
if prod_ui_build:
docker_build(
'ghcr.io/sillsdev/lexbox-ui',
context='frontend',
dockerfile='./frontend/Dockerfile',
only=['.']
)
else:
docker_build(
'ghcr.io/sillsdev/lexbox-ui',
context='frontend',
dockerfile='./frontend/dev.Dockerfile',
only=['.'],
live_update=[
sync('frontend', '/app'),
]
)

docker_build(
'ghcr.io/sillsdev/lexbox-hgweb',
Expand Down
3 changes: 3 additions & 0 deletions backend/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
<BaseOutputPath>$(MSBuildProjectDirectory)/bin/container/</BaseOutputPath>
</PropertyGroup>
<PropertyGroup>
<InformationalVersion>dev</InformationalVersion>
<TargetFramework>net9.0</TargetFramework>
<EnforceCodeStyleInBuild>false</EnforceCodeStyleInBuild>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<WarningsAsErrors>Nullable</WarningsAsErrors>
</PropertyGroup>
Expand Down
4 changes: 2 additions & 2 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# syntax=docker/dockerfile:1
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443

FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build

COPY . .
# WORKDIR /src
Expand Down
13 changes: 8 additions & 5 deletions backend/FixFwData/FixFwData.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RootNamespace>FixFwData</RootNamespace>
<Description>FixFwData</Description>
<Company>SIL Global</Company>
<Authors>SIL Global</Authors>
<Product>LexBoxApi Testing</Product>
<Copyright>Copyright © 2024 SIL Global</Copyright>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="9.0.0" />
<PackageReference Include="SIL.LCModel.FixData" Version="11.0.0-beta0109" />
</ItemGroup>
</Project>
6 changes: 2 additions & 4 deletions backend/FwHeadless/FwHeadless.csproj
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<Mercurial4ChorusDestDir>$(MSBuildProjectDirectory)</Mercurial4ChorusDestDir>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="9.0.0-rc.1.24452.1" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="9.0.0" />
<PackageReference Include="Scalar.AspNetCore" Version="1.2.22" />
<PackageReference Include="SIL.ChorusPlugin.LfMergeBridge" Version="4.2.0-beta0027" />
<PackageReference Include="SIL.Chorus.Mercurial" Version="6.5.1.*" />
<PackageReference Include="System.Security.Cryptography.Xml" Version="9.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions backend/FwHeadless/dev.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ WORKDIR /src/backend
# Uncomment line below if second COPY fails
# RUN mkdir -p FwLite && chown www-data:www-data FwLite
# Copy the main source project files
COPY --chown=www-data:www-data *.sln FwHeadless/FwHeadless.csproj FixFwData/FixFwData.csproj LexCore/LexCore.csproj LexData/LexData.csproj ./
COPY --chown=www-data:www-data *.sln FwHeadless/FwHeadless.csproj FixFwData/FixFwData.csproj LexCore/LexCore.csproj LexData/LexData.csproj Directory.Build.props ./
# move them into the proper sub folders, based on the name of the project
RUN for file in $(ls *.csproj); do dir=${file%.*}; mkdir -p ${dir}/ && mv -v $file ${dir}/; done
# Do the same for csproj files in slightly different hierarchies
COPY --chown=www-data:www-data harmony/src/*/*.csproj ./
RUN for file in $(ls *.csproj); do dir=${file%.*}; mkdir -p harmony/src/${dir}/ && mv -v $file harmony/src/${dir}/; done
COPY --chown=www-data:www-data harmony/src/Directory.Build.props ./harmony/src/
COPY --chown=www-data:www-data harmony/src/Directory.Build.props harmony/Directory.Packages.props ./harmony/src/
COPY --chown=www-data:www-data FwLite/FwDataMiniLcmBridge/FwDataMiniLcmBridge.csproj FwLite/LcmCrdt/LcmCrdt.csproj FwLite/MiniLcm/MiniLcm.csproj FwLite/FwLiteProjectSync/FwLiteProjectSync.csproj ./
RUN for file in $(ls *.csproj); do dir=${file%.*}; mkdir -p FwLite/${dir}/ && mv -v $file FwLite/${dir}/; done

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@ namespace FwDataMiniLcmBridge.Tests.Fixtures;

public static class FwDataTestsKernel
{
public static IServiceCollection AddTestFwDataBridge(this IServiceCollection services)
public static IServiceCollection AddTestFwDataBridge(this IServiceCollection services, bool mockProjectLoader = true)
{
services.AddFwDataBridge();
services.AddSingleton<IConfiguration>(_ => new ConfigurationRoot([]));
services.AddSingleton<MockFwProjectLoader>();
services.AddSingleton<IProjectLoader>(sp => sp.GetRequiredService<MockFwProjectLoader>());
services.AddSingleton<FieldWorksProjectList, MockFwProjectList>();
if (mockProjectLoader)
{
services.AddSingleton<MockFwProjectLoader>();
services.AddSingleton<IProjectLoader>(sp => sp.GetRequiredService<MockFwProjectLoader>());
services.AddSingleton<FieldWorksProjectList, MockFwProjectList>();
}
return services;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public class MockFwProjectList(IOptions<FwDataBridgeConfig> config, MockFwProjec
{
public override IEnumerable<IProjectIdentifier> EnumerateProjects()
{
return loader.Projects.Keys.Select(k => new FwDataProject(k, config.Value.ProjectsFolder));
return loader.Projects.Keys.Select(k => new FwDataProject(k, _config.Value.ProjectsFolder));
}

public override FwDataProject? GetProject(string name)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
Expand All @@ -18,16 +15,16 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.1"/>
<PackageReference Include="Microsoft.Extensions.Configuration" Version="9.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="9.0.0" />
<PackageReference Include="FluentAssertions" Version="7.0.0-alpha.5"/>
<PackageReference Include="xunit" Version="2.9.0" />
<PackageReference Include="xunit" Version="2.9.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Loading

0 comments on commit 02d0e3e

Please sign in to comment.