fix:ci
This commit is contained in:
parent
430e1d8617
commit
9f29202764
28
.github/workflows/on-pr.yml
vendored
28
.github/workflows/on-pr.yml
vendored
@ -1,7 +1,7 @@
|
|||||||
name: build-packages
|
name: build-packages
|
||||||
on: pull_request
|
on: pull_request
|
||||||
jobs:
|
jobs:
|
||||||
connectors-packages:
|
build-check:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
DOTNET_INSTALL_DIR: "/home/runner"
|
DOTNET_INSTALL_DIR: "/home/runner"
|
||||||
@ -24,3 +24,29 @@ jobs:
|
|||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- run: dotnet build --configuration Release
|
- run: dotnet build --configuration Release
|
||||||
|
run-tests:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
DOTNET_INSTALL_DIR: "/home/runner"
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
packages: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Cleanup build folder
|
||||||
|
run: |
|
||||||
|
rm -rf ./* ./.??* || true
|
||||||
|
|
||||||
|
- name: Set up .NET
|
||||||
|
uses: actions/setup-dotnet@v3
|
||||||
|
with:
|
||||||
|
dotnet-version: 8.0.x
|
||||||
|
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Run Tests
|
||||||
|
run: |
|
||||||
|
dotnet test ./meilisearch.NET.Tests/meilisearch.NET.Tests.csproj
|
30
.github/workflows/on-push.yml
vendored
30
.github/workflows/on-push.yml
vendored
@ -6,7 +6,7 @@ on:
|
|||||||
- 'master'
|
- 'master'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
meilisearch-dotnet-packages:
|
nuget-package:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
DOTNET_INSTALL_DIR: "/home/runner"
|
DOTNET_INSTALL_DIR: "/home/runner"
|
||||||
@ -70,4 +70,30 @@ jobs:
|
|||||||
Automated release of MeiliSearch.NET version ${{ steps.gitversion.outputs.SemVer }}."
|
Automated release of MeiliSearch.NET version ${{ steps.gitversion.outputs.SemVer }}."
|
||||||
files: nuget-packages/*.nupkg
|
files: nuget-packages/*.nupkg
|
||||||
draft: false
|
draft: false
|
||||||
prerelease: false
|
prerelease: true
|
||||||
|
run-tests:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
DOTNET_INSTALL_DIR: "/home/runner"
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
packages: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Cleanup build folder
|
||||||
|
run: |
|
||||||
|
rm -rf ./* ./.??* || true
|
||||||
|
|
||||||
|
- name: Set up .NET
|
||||||
|
uses: actions/setup-dotnet@v3
|
||||||
|
with:
|
||||||
|
dotnet-version: 8.0.x
|
||||||
|
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Run Tests
|
||||||
|
run: |
|
||||||
|
dotnet test ./meilisearch.NET.Tests/meilisearch.NET.Tests.csproj
|
34
.github/workflows/on-release.yml
vendored
Normal file
34
.github/workflows/on-release.yml
vendored
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
name: update-release-status
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
update-release:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Get latest release
|
||||||
|
id: latest_release
|
||||||
|
uses: actions/github-script@v6
|
||||||
|
with:
|
||||||
|
script: |
|
||||||
|
const release = await github.rest.repos.getLatestRelease({
|
||||||
|
owner: context.repo.owner,
|
||||||
|
repo: context.repo.repo
|
||||||
|
});
|
||||||
|
return release.data;
|
||||||
|
|
||||||
|
- name: Update release
|
||||||
|
uses: actions/github-script@v6
|
||||||
|
with:
|
||||||
|
script: |
|
||||||
|
const release = ${{ steps.latest_release.outputs.result }};
|
||||||
|
await github.rest.repos.updateRelease({
|
||||||
|
owner: context.repo.owner,
|
||||||
|
repo: context.repo.repo,
|
||||||
|
release_id: release.id,
|
||||||
|
prerelease: false
|
||||||
|
});
|
25
meilisearch.NET.Tests/meilisearch.NET.Tests.csproj
Normal file
25
meilisearch.NET.Tests/meilisearch.NET.Tests.csproj
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
|
||||||
|
<IsPackable>false</IsPackable>
|
||||||
|
<IsTestProject>true</IsTestProject>
|
||||||
|
<RootNamespace>TestProject1</RootNamespace>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="coverlet.collector" Version="6.0.0"/>
|
||||||
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0"/>
|
||||||
|
<PackageReference Include="NUnit" Version="3.14.0"/>
|
||||||
|
<PackageReference Include="NUnit.Analyzers" Version="3.9.0"/>
|
||||||
|
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0"/>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Using Include="NUnit.Framework"/>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
@ -1,10 +0,0 @@
|
|||||||
namespace meilisearch.NET.Enums;
|
|
||||||
|
|
||||||
public enum MeiliSearchStatus
|
|
||||||
{
|
|
||||||
Stopped,
|
|
||||||
Starting,
|
|
||||||
Running,
|
|
||||||
Stopping,
|
|
||||||
Crashed
|
|
||||||
}
|
|
6
meilisearch.NET/Models/ProcessResourceStats.cs
Normal file
6
meilisearch.NET/Models/ProcessResourceStats.cs
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
namespace meilisearch.NET.Models;
|
||||||
|
|
||||||
|
public class ProcessResourceStats
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user