Skip to content

Commit

Permalink
Merge pull request #201 from loresoft/develop
Browse files Browse the repository at this point in the history
update main
  • Loading branch information
pwelter34 authored Jan 3, 2024
2 parents 10167d3 + c01100e commit 6f0084e
Show file tree
Hide file tree
Showing 124 changed files with 976 additions and 708 deletions.
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: daily
time: "02:00"
open-pull-requests-limit: 10
- package-ecosystem: nuget
directory: "/service/"
schedule:
Expand Down
88 changes: 56 additions & 32 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
name: Build Project

env:
BUILD_PATH: '${{github.workspace}}/publish'
BUILD_VERSION: '1.8.${{github.run_number}}'
BUILD_INFORMATION: '1.8.${{github.run_number}}+Branch.${{github.ref_name}}.Sha.${{github.sha}}'
DOTNET_NOLOGO: true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_ENVIRONMENT: github
ASPNETCORE_ENVIRONMENT: github
BUILD_PATH: '${{github.workspace}}/artifacts'

on:
push:
branches:
- master
- develop
tags:
- "v*"
pull_request:
branches:
- master
Expand All @@ -21,23 +25,23 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup .NET 7.0
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
dotnet-version: 8.0.x

- name: Setup MSBuild
uses: microsoft/setup-msbuild@v1.1
uses: microsoft/setup-msbuild@v1.3

- name: Restore Dependencies
run: dotnet restore ./service/InstructorIQ.sln

- name: Build Solution
run: 'dotnet build ./service/InstructorIQ.sln --no-restore --configuration Release -p:Version="${{env.BUILD_VERSION}}" -p:InformationalVersion="${{env.BUILD_INFORMATION}}"'
run: 'dotnet build ./service/InstructorIQ.sln --no-restore --configuration Release'

- name: Publish Web Application
if: success()
Expand All @@ -61,58 +65,78 @@ jobs:
name: Database
path: '${{env.BUILD_PATH}}/Database'

deploy-website:

deploy-staging:
runs-on: ubuntu-latest
needs: build-project
if: success() && github.event_name != 'pull_request' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop')

environment:
name: Staging
url: https://staging.instructoriq.com/

steps:
- name: Download Database Artifact
uses: actions/download-artifact@v3
with:
name: Database

- name: Download Web Application Artifact
uses: actions/download-artifact@v3
with:
name: WebApplication

- name: Deploy Web Application to Azure Staging
if: github.ref == 'refs/heads/develop'
uses: azure/webapps-deploy@v2
- name: Deploy SQL Server Database to Azure
if: success() && github.event_name != 'pull_request' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop')
uses: azure/sql-action@v2.2
with:
connection-string: ${{secrets.AZURE_SQL_CONNECTION_STAGING}}
path: './InstructorIQ.dacpac'
action: 'publish'

- name: Deploy Web Application to Azure
if: success() && github.event_name != 'pull_request' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop')
uses: azure/webapps-deploy@v3
with:
app-name: 'web-ls-app-eus-iq-stg-01'
slot-name: 'Production'
publish-profile: ${{secrets.PUBLISH_PROFILE_STAGING}}
package: ./

- name: Deploy Web Application to Azure Production
if: github.ref == 'refs/heads/master'
uses: azure/webapps-deploy@v2
with:
app-name: 'web-ls-app-eus-iq-prd-01'
slot-name: 'Production'
publish-profile: ${{secrets.PUBLISH_PROFILE_PRODUCTION}}
package: ./

deploy-database:
runs-on: windows-latest
deploy-production:
runs-on: ubuntu-latest
needs: build-project
if: success() && github.event_name != 'pull_request' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop')
if: success() && github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/v')

environment:
name: Production
url: https://instructoriq.com/

steps:
- name: Download Database Artifact
uses: actions/download-artifact@v3
with:
name: Database

- name: Deploy SQL Server Database to Azure Staging
if: github.ref == 'refs/heads/develop'
uses: azure/sql-action@v2.1
- name: Download Web Application Artifact
uses: actions/download-artifact@v3
with:
connection-string: ${{secrets.AZURE_SQL_CONNECTION_STAGING}}
path: './InstructorIQ.dacpac'
action: 'publish'
name: WebApplication

- name: Deploy SQL Server Database to Azure Production
if: github.ref == 'refs/heads/master'
uses: azure/sql-action@v2.1
- name: Deploy SQL Server Database to Azure
if: success() && github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/v')
uses: azure/sql-action@v2.2
with:
connection-string: ${{secrets.AZURE_SQL_CONNECTION_PRODUCTION}}
path: './InstructorIQ.dacpac'
action: 'publish'

- name: Deploy Web Application to Azure
if: success() && github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/v')
uses: azure/webapps-deploy@v3
with:
app-name: 'web-ls-app-eus-iq-prd-01'
slot-name: 'Production'
publish-profile: ${{secrets.PUBLISH_PROFILE_PRODUCTION}}
package: ./
10 changes: 8 additions & 2 deletions service/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,15 @@
<NoWarn>1591</NoWarn>
</PropertyGroup>

<PropertyGroup>
<MinVerTagPrefix>v</MinVerTagPrefix>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="Injectio" Version="2.6.1" PrivateAssets="all" />
<PackageReference Include="AssemblyMetadata.Generators" Version="2.0.0" PrivateAssets="All" />
<PackageReference Include="Injectio" Version="3.1.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
<PackageReference Include="MinVer" Version="4.3.0" PrivateAssets="All" />
</ItemGroup>

<ItemGroup>
Expand Down
16 changes: 10 additions & 6 deletions service/src/InstructorIQ.Core/Data/DataServiceModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,16 @@ public class DataServiceModule
[RegisterServices]
public void Register(IServiceCollection services)
{
services.AddDbContext<InstructorIQContext>((provider, options) =>
{
var configuration = provider.GetRequiredService<IConfiguration>();
var connectionString = configuration.GetConnectionString("InstructorIQ");
options.UseSqlServer(connectionString, providerOptions => providerOptions.EnableRetryOnFailure());
}, ServiceLifetime.Transient);
services.AddDbContext<InstructorIQContext>(
optionsAction: (provider, options) =>
{
var configuration = provider.GetRequiredService<IConfiguration>();
var connectionString = configuration.GetConnectionString("InstructorIQ");
options.UseSqlServer(connectionString, providerOptions => providerOptions.EnableRetryOnFailure());
},
contextLifetime: ServiceLifetime.Transient,
optionsLifetime: ServiceLifetime.Transient
);

services.TryAddSingleton<IDataConfiguration>(provider =>
{
Expand Down
6 changes: 3 additions & 3 deletions service/src/InstructorIQ.Core/Data/Entities/Attendance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public Attendance()
/// <value>
/// The property value representing column 'RowVersion'.
/// </value>
public Byte[] RowVersion { get; set; }
public long RowVersion { get; set; }

#endregion

Expand All @@ -130,7 +130,7 @@ public Attendance()
/// Gets or sets the navigation property for entity <see cref="Session" />.
/// </summary>
/// <value>
/// The the navigation property for entity <see cref="Session" />.
/// The navigation property for entity <see cref="Session" />.
/// </value>
/// <seealso cref="SessionId" />
public virtual Session Session { get; set; }
Expand All @@ -139,7 +139,7 @@ public Attendance()
/// Gets or sets the navigation property for entity <see cref="Tenant" />.
/// </summary>
/// <value>
/// The the navigation property for entity <see cref="Tenant" />.
/// The navigation property for entity <see cref="Tenant" />.
/// </value>
/// <seealso cref="TenantId" />
public virtual Tenant Tenant { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public AuthenticationEvent()
/// <value>
/// The property value representing column 'RowVersion'.
/// </value>
public Byte[] RowVersion { get; set; }
public long RowVersion { get; set; }

#endregion

Expand Down
6 changes: 3 additions & 3 deletions service/src/InstructorIQ.Core/Data/Entities/Discussion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ public Discussion()
/// <value>
/// The property value representing column 'RowVersion'.
/// </value>
public Byte[] RowVersion { get; set; }
public long RowVersion { get; set; }

/// <summary>
/// Gets or sets the property value representing column 'PeriodStart'.
Expand All @@ -195,7 +195,7 @@ public Discussion()
/// Gets or sets the navigation property for entity <see cref="Tenant" />.
/// </summary>
/// <value>
/// The the navigation property for entity <see cref="Tenant" />.
/// The navigation property for entity <see cref="Tenant" />.
/// </value>
/// <seealso cref="TenantId" />
public virtual Tenant Tenant { get; set; }
Expand All @@ -204,7 +204,7 @@ public Discussion()
/// Gets or sets the navigation property for entity <see cref="Topic" />.
/// </summary>
/// <value>
/// The the navigation property for entity <see cref="Topic" />.
/// The navigation property for entity <see cref="Topic" />.
/// </value>
/// <seealso cref="TopicId" />
public virtual Topic Topic { get; set; }
Expand Down
4 changes: 2 additions & 2 deletions service/src/InstructorIQ.Core/Data/Entities/EmailDelivery.cs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ public EmailDelivery()
/// <value>
/// The property value representing column 'RowVersion'.
/// </value>
public Byte[] RowVersion { get; set; }
public long RowVersion { get; set; }

#endregion

Expand All @@ -179,7 +179,7 @@ public EmailDelivery()
/// Gets or sets the navigation property for entity <see cref="Tenant" />.
/// </summary>
/// <value>
/// The the navigation property for entity <see cref="Tenant" />.
/// The navigation property for entity <see cref="Tenant" />.
/// </value>
/// <seealso cref="TenantId" />
public virtual Tenant Tenant { get; set; }
Expand Down
4 changes: 2 additions & 2 deletions service/src/InstructorIQ.Core/Data/Entities/EmailTemplate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public EmailTemplate()
/// <value>
/// The property value representing column 'RowVersion'.
/// </value>
public Byte[] RowVersion { get; set; }
public long RowVersion { get; set; }

#endregion

Expand All @@ -149,7 +149,7 @@ public EmailTemplate()
/// Gets or sets the navigation property for entity <see cref="Tenant" />.
/// </summary>
/// <value>
/// The the navigation property for entity <see cref="Tenant" />.
/// The navigation property for entity <see cref="Tenant" />.
/// </value>
/// <seealso cref="TenantId" />
public virtual Tenant Tenant { get; set; }
Expand Down
6 changes: 3 additions & 3 deletions service/src/InstructorIQ.Core/Data/Entities/Group.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public Group()
/// <value>
/// The property value representing column 'RowVersion'.
/// </value>
public Byte[] RowVersion { get; set; }
public long RowVersion { get; set; }

/// <summary>
/// Gets or sets the property value representing column 'PeriodStart'.
Expand All @@ -132,15 +132,15 @@ public Group()
/// Gets or sets the navigation collection for entity <see cref="Session" />.
/// </summary>
/// <value>
/// The the navigation collection for entity <see cref="Session" />.
/// The navigation collection for entity <see cref="Session" />.
/// </value>
public virtual ICollection<Session> Sessions { get; set; }

/// <summary>
/// Gets or sets the navigation property for entity <see cref="Tenant" />.
/// </summary>
/// <value>
/// The the navigation property for entity <see cref="Tenant" />.
/// The navigation property for entity <see cref="Tenant" />.
/// </value>
/// <seealso cref="TenantId" />
public virtual Tenant Tenant { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ public HistoryRecord()
/// <value>
/// The property value representing column 'RowVersion'.
/// </value>
public Byte[] RowVersion { get; set; }
public long RowVersion { get; set; }

#endregion

Expand Down
4 changes: 2 additions & 2 deletions service/src/InstructorIQ.Core/Data/Entities/ImportJob.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public ImportJob()
/// <value>
/// The property value representing column 'RowVersion'.
/// </value>
public Byte[] RowVersion { get; set; }
public long RowVersion { get; set; }

#endregion

Expand All @@ -105,7 +105,7 @@ public ImportJob()
/// Gets or sets the navigation property for entity <see cref="Tenant" />.
/// </summary>
/// <value>
/// The the navigation property for entity <see cref="Tenant" />.
/// The navigation property for entity <see cref="Tenant" />.
/// </value>
/// <seealso cref="TenantId" />
public virtual Tenant Tenant { get; set; }
Expand Down
8 changes: 4 additions & 4 deletions service/src/InstructorIQ.Core/Data/Entities/InstructorRole.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public InstructorRole()
/// <value>
/// The property value representing column 'RowVersion'.
/// </value>
public Byte[] RowVersion { get; set; }
public long RowVersion { get; set; }

#endregion

Expand All @@ -101,15 +101,15 @@ public InstructorRole()
/// Gets or sets the navigation collection for entity <see cref="SessionInstructor" />.
/// </summary>
/// <value>
/// The the navigation collection for entity <see cref="SessionInstructor" />.
/// The navigation collection for entity <see cref="SessionInstructor" />.
/// </value>
public virtual ICollection<SessionInstructor> SessionInstructors { get; set; }

/// <summary>
/// Gets or sets the navigation property for entity <see cref="Tenant" />.
/// </summary>
/// <value>
/// The the navigation property for entity <see cref="Tenant" />.
/// The navigation property for entity <see cref="Tenant" />.
/// </value>
/// <seealso cref="TenantId" />
public virtual Tenant Tenant { get; set; }
Expand All @@ -118,7 +118,7 @@ public InstructorRole()
/// Gets or sets the navigation collection for entity <see cref="TopicInstructor" />.
/// </summary>
/// <value>
/// The the navigation collection for entity <see cref="TopicInstructor" />.
/// The navigation collection for entity <see cref="TopicInstructor" />.
/// </value>
public virtual ICollection<TopicInstructor> TopicInstructors { get; set; }

Expand Down
Loading

0 comments on commit 6f0084e

Please sign in to comment.