Skip to content

Commit

Permalink
Refactored and cleaned the library
Browse files Browse the repository at this point in the history
  • Loading branch information
Youssef-ben committed Nov 1, 2023
1 parent 83a8328 commit 65a8a5c
Show file tree
Hide file tree
Showing 73 changed files with 2,398 additions and 1,793 deletions.
77 changes: 49 additions & 28 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,45 +2,66 @@ name: Cassandra Fluent library

on:
push:
# branches: [master]

pull_request:
branches: [master, dev]
branches: [master]

jobs:
build:
runs-on: ubuntu-latest
# build:
# runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-dotnet@v1
with:
dotnet-version: "3.1.x"
# strategy:
# matrix:
# dotnet: ["3.1.x", "5.0.x", "7.0.x"]

- name: Restore packages
run: dotnet restore
# services:
# cfm-cassandra:
# image: cassandra:latest
# ports:
# - 9042:9042

- name: Build project
run: dotnet build
# env:
# CASSANDRA_CLUSTER_NAME: cfm-cluster

test:
needs: build
runs-on: ubuntu-latest
# options: --health-cmd "cqlsh --debug" --health-interval 10s --health-retries 10

services:
cfm-cassandra:
image: cassandra:latest
ports:
- 9042:9042
# steps:
# - uses: actions/checkout@v3

env:
CASSANDRA_CLUSTER_NAME: cfm-cluster
# - name: Setup dotnet
# uses: actions/setup-dotnet@v3
# with:
# dotnet-version: ${{ matrix.dotnet }}

options: --health-cmd "cqlsh --debug" --health-interval 10s --health-retries 10
# - name: Restoring packages
# run: dotnet restore

# - name: Building
# run: dotnet build --configuration Release --no-restore

# - name: Testing
# run: dotnet test --no-restore --collect:"XPlat Code Coverage" --results-directory ./TestResults/.coverage

bump-version:
runs-on: ubuntu-latest
# needs: [build]
# if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v2
- uses: actions/setup-dotnet@v1
- uses: actions/checkout@v3
with:
dotnet-version: "3.1.x"
ref: ${{ github.head_ref }}

- name: Get current Version
run: echo "CURRENT_VERSION=$(./Scripts/version-bump.sh -get Cassandra.Fluent.Migrator/Cassandra.Fluent.Migrator.csproj)" >> $GITHUB_ENV

- name: Bump Version
run: echo "NEW_VERSION=$(./Scripts/version-bump.sh patch Cassandra.Fluent.Migrator/Cassandra.Fluent.Migrator.csproj)" >> $GITHUB_ENV

- name: Run tests
run: dotnet test
- name: Push changes to the repository
run: |
git config --global user.name 'GitHub Action'
git config --global user.email 'github-action@github.com'
git add -A
git commit -m '[skip ci] Library version bumped from [${{ env.CURRENT_VERSION }}] to [${{ env.NEW_VERSION }}] !'
# git push
Original file line number Diff line number Diff line change
@@ -1,28 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<CodeAnalysisRuleSet>$(SolutionDir)\StyleCopRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<NoWarn>$(NoWarn);1591</NoWarn>
<LangVersion>10</LangVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='$(Configuration)|AnyCPU'">
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='$(Configuration)|AnyCPU'">
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration" Version="3.1.10" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="3.1.10" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="3.1.10" />
<PackageReference Include="Microsoft.Extensions.Options" Version="3.1.10" />
<PackageReference Include="Moq" Version="4.15.2" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Cassandra.Fluent.Migrator\Cassandra.Fluent.Migrator.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Cassandra.Fluent.Migrator\Cassandra.Fluent.Migrator.csproj"/>
</ItemGroup>

</Project>

This file was deleted.

48 changes: 0 additions & 48 deletions Cassandra.Fluent.Migrator.Common/Configuration/InitialMigration.cs

This file was deleted.

17 changes: 0 additions & 17 deletions Cassandra.Fluent.Migrator.Common/Configuration/Models/Address.cs

This file was deleted.

23 changes: 0 additions & 23 deletions Cassandra.Fluent.Migrator.Common/Configuration/Models/Users.cs

This file was deleted.

Loading

0 comments on commit 65a8a5c

Please sign in to comment.