Skip to content
Draft
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
2 changes: 1 addition & 1 deletion .github/workflows/dev-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: "8.0.x"
dotnet-version: "10.0.x"

- name: Install MAUI Workloads
run: dotnet workload restore
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: "8.0.x"
dotnet-version: "10.0.x"

- name: Install MAUI Workloads
run: dotnet workload restore
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Setup .NET SDK
uses: actions/setup-dotnet@v5
with:
dotnet-version: '8.0'
dotnet-version: '10.0'

- name: Install MAUI Workloads
run: dotnet workload restore
Expand All @@ -30,4 +30,4 @@ jobs:
run: dotnet restore

- name: Run tests
run: dotnet test -v n --framework net8.0
run: dotnet test -v n --framework net10.0
27 changes: 17 additions & 10 deletions PowerSync/PowerSync.Common/PowerSync.Common.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net6.0;net8.0;net9.0;net8.0-ios;net8.0-android;net8.0-maccatalyst;net9.0-ios;net9.0-android;net9.0-maccatalyst</TargetFrameworks>
<DefaultTargetFrameworks>net8.0;net9.0;net10.0;net9.0-android;net10.0-android</DefaultTargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('OSX'))">$(DefaultTargetFrameworks);net9.0-ios;net10.0-ios;net9.0-maccatalyst;net10.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="!$([MSBuild]::IsOSPlatform('OSX'))">$(DefaultTargetFrameworks)</TargetFrameworks>

<LangVersion>12</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
Expand All @@ -27,22 +30,26 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Dapper" Version="2.1.66" />
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="9.0.1" />
<PackageReference Include="Microsoft.Data.Sqlite" Version="9.0.1" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Dapper" Version="2.1.79" />
<PackageReference Include="Microsoft.Data.Sqlite" Version="10.0.9" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="10.0.9" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="10.0.9" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
<PackageReference Include="Nito.AsyncEx" Version="5.1.2" />
<PackageReference Include="System.Threading.Channels" Version="8.0.0" />
<PackageReference Include="ThrottleDebounce" Version="2.0.1" />
<PackageReference Include="System.Threading.Channels" Version="10.0.9" />
<PackageReference Include="ThrottleDebounce" Version="2.0.2" />
</ItemGroup>

<ItemGroup>
<None Include="PowerSync.Common.targets" Pack="true" PackagePath="build\" />
<None Include="PowerSync.Common.targets" Pack="true" PackagePath="buildTransitive\" />
</ItemGroup>


<ItemGroup>
<!-- Temporary workaround until vulnerability fixed: https://github.com/dotnet/efcore/issues/38257 -->
<PackageReference Include="SQLitePCLRaw.bundle_e_sqlite3" VersionOverride="3.0.3" />
</ItemGroup>

<!-- Check allows us to skip for all MAUI targets-->
<!-- For monorepo-->
<ItemGroup Condition="!$(TargetFramework.EndsWith('-android')) AND !$(TargetFramework.EndsWith('-ios')) AND !$(TargetFramework.EndsWith('-maccatalyst'))">
Expand Down
5 changes: 4 additions & 1 deletion PowerSync/PowerSync.Maui/PowerSync.Maui.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net6.0;net8.0;net9.0;net8.0-ios;net8.0-android;net8.0-maccatalyst;net9.0-ios;net9.0-android;net9.0-maccatalyst</TargetFrameworks>
<DefaultTargetFrameworks>net9.0;net10.0;net9.0-android;net10.0-android</DefaultTargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('OSX'))">$(DefaultTargetFrameworks);net9.0-ios;net10.0-ios;net9.0-maccatalyst;net10.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="!$([MSBuild]::IsOSPlatform('OSX'))">$(DefaultTargetFrameworks)</TargetFrameworks>

<LangVersion>12</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,40 +108,40 @@ dotnet restore
Run all tests

```bash
dotnet test -v n --framework net8.0
dotnet test -v n --framework net10.0
```

Run a specific test

```bash
dotnet test -v n --framework net8.0 --filter "test-file-pattern"
dotnet test -v n --framework net10.0 --filter "test-file-pattern"
```

### Integration Tests
Integration tests in `PowerSync.Common.IntegrationTests` are intended to run against the [self-host nodejs demo](https://github.com/powersync-ja/self-host-demo/tree/main/demos/nodejs).
The integration tests are disabled by default, define the following environment variable when running the tests.

```bash
RUN_INTEGRATION_TESTS=true dotnet test -v n --framework net8.0
RUN_INTEGRATION_TESTS=true dotnet test -v n --framework net10.0
```

Only run integration tests, without any unit tests.

```bash
RUN_INTEGRATION_TESTS=true dotnet test -v n --framework net8.0 --filter "Category=Integration"
RUN_INTEGRATION_TESTS=true dotnet test -v n --framework net10.0 --filter "Category=Integration"
```

### Performance Tests
Performance tests in `PowerSync.Common.PerformanceTests` are disabled by default, define the following environment variable when running the tests.

```bash
RUN_PERFORMANCE_TESTS=true dotnet test -v n --framework net8.0
RUN_PERFORMANCE_TESTS=true dotnet test -v n --framework net10.0
```

Only run performance tests, without any unit tests.

```bash
RUN_PERFORMANCE_TESTS=true dotnet test -v n --framework net8.0 --filter "Category=Performance"
RUN_PERFORMANCE_TESTS=true dotnet test -v n --framework net10.0 --filter "Category=Performance"
```

## Using the PowerSync.Common package in your project
Expand Down
Loading