Skip to content

Performance improvement #92

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 28 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
990c821
Remove pages YAML file
fwickert Oct 29, 2024
bb51638
WF
Oct 29, 2024
434360b
Create firstWF.yml
fwickert Oct 29, 2024
bf50197
Update firstWF.yml
fwickert Oct 29, 2024
ed51031
resolves #3
Oct 29, 2024
4d6bd3e
Ex 3.2
Oct 29, 2024
b11ce23
Merge pull request #4 from fwickert/3-support-250-characters-instead-…
fwickert Oct 29, 2024
bd19f46
update WF path
Oct 29, 2024
456374a
Merge pull request #5 from fwickert/3-support-250-characters-instead-…
fwickert Oct 29, 2024
4a60981
Create dotnet.yml
fwickert Oct 29, 2024
cc1694f
docker
Oct 29, 2024
1bcdd93
Docker build push
Oct 29, 2024
16e3ed6
test
Oct 29, 2024
7e693cd
Docker to deploy
Oct 29, 2024
a2f9c05
change for test
Oct 29, 2024
62f8f61
Create CODEOWNERS
fwickert Oct 30, 2024
e1604ed
Merge pull request #6 from fwickert/fwickert-patch-1
fwickert Oct 30, 2024
b4d11cb
Update README.md
fwickert Oct 30, 2024
1f99269
Merge pull request #7 from fwickert/fwickert-readme
fwickert Oct 30, 2024
3bb1b41
Fix issue with prod deployment
Oct 30, 2024
0bcf77e
Bump rexml from 3.3.6 to 3.3.9
dependabot[bot] Oct 30, 2024
93fa64f
Revise SECURITY.md to reflect updated reporting procedures and remove…
Oct 30, 2024
2c1d071
Create codeql.yml
fwickert Oct 30, 2024
bdd9811
Merge pull request #8 from fwickert/dependabot/bundler/rexml-3.3.9
fwickert Oct 30, 2024
68f137e
Update .gitignore, enhance file extraction safety, and upgrade Newton…
Oct 30, 2024
fd7222a
Merge branch 'main' of https://github.com/fwickert/TechExcel-Accelera…
Oct 30, 2024
55e92ff
Refactor word count calculation for improved performance and readability
Oct 30, 2024
0a0c369
Add missing using directive for System.Linq in Index.cshtml.cs
Oct 30, 2024
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
94 changes: 94 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL Advanced"

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
schedule:
- cron: '42 17 * * 2'

jobs:
analyze:
name: Analyze (${{ matrix.language }})
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners (GitHub.com only)
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
permissions:
# required for all workflows
security-events: write

# required to fetch internal or private CodeQL packs
packages: read

# only required for workflows in private repositories
actions: read
contents: read

strategy:
fail-fast: false
matrix:
include:
- language: csharp
build-mode: none
- language: ruby
build-mode: none
# CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
# Use `c-cpp` to analyze code written in C, C++ or both
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
steps:
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality

# If the analyze step fails for one of the languages you are analyzing with
# "We were unable to automatically build your code", modify the matrix above
# to set the build mode to "manual" for that language. Then modify this step
# to build your code.
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
- if: matrix.build-mode == 'manual'
shell: bash
run: |
echo 'If you are using a "manual" build mode for one or more of the' \
'languages you are analyzing, replace this with the commands to build' \
'your code, for example:'
echo ' make bootstrap'
echo ' make release'
exit 1

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
123 changes: 123 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
name: .NET CI

env:
registryName: p5tgcusa4unsumpnpreg.azurecr.io
repositoryName: techexcel/dotnetcoreapp
dockerFolderPath: ./src/Application/src/RazorPagesTestSample
tag: ${{github.run_number}}

on:
push:
branches: [ main ]
paths: src/Application/**
pull_request:
branches: [ main ]
paths: src/Application/**
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:

runs-on: ubuntu-latest

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

- name: Restore dependencies
run: dotnet restore ./src/Application/src/RazorPagesTestSample/RazorPagesTestSample.csproj
- name: Build
run: dotnet build --no-restore ./src/Application/src/RazorPagesTestSample/RazorPagesTestSample.csproj
- name: Test
run: dotnet test --no-build --verbosity normal ./src/Application/tests/RazorPagesTestSample.Tests/RazorPagesTestSample.Tests.csproj

dockerBuildPush:
runs-on: ubuntu-latest
needs: build

steps:
- uses: actions/checkout@v3

- name: Docker Login
# You may pin to the exact commit or the version.
# uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
uses: docker/[email protected]
with:
# Server address of Docker registry. If not set then will default to Docker Hub
registry: ${{ secrets.ACR_LOGIN_SERVER }}
# Username used to log against the Docker registry
username: ${{ secrets.ACR_USERNAME }}
# Password or personal access token used to log against the Docker registry
password: ${{ secrets.ACR_PASSWORD }}
# Log out from the Docker registry at the end of a job
logout: true

- name: Docker Build
run: docker build -t $registryName/$repositoryName:$tag --build-arg build_version=$tag $dockerFolderPath

- name: Docker Push
run: docker push $registryName/$repositoryName:$tag

deploy-to-dev:

runs-on: ubuntu-latest
needs: dockerBuildPush
environment:
name: dev
url: https://p5tgcusa4unsu-dev.azurewebsites.net/

steps:
- name: 'Login via Azure CLI'
uses: azure/[email protected]
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}

- uses: azure/webapps-deploy@v2
with:
app-name: 'p5tgcusa4unsu-dev'
images: p5tgcusa4unsumpnpreg.azurecr.io/techexcel/dotnetcoreapp:${{github.run_number}}

deploy-to-test:

runs-on: ubuntu-latest
needs: deploy-to-dev
environment:
name: test
url: https://p5tgcusa4unsu-test.azurewebsites.net/

steps:
- uses: actions/checkout@v3

- name: 'Login via Azure CLI'
uses: azure/[email protected]
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}

- uses: azure/webapps-deploy@v2
with:
app-name: 'p5tgcusa4unsu-test'
images: p5tgcusa4unsumpnpreg.azurecr.io/techexcel/dotnetcoreapp:${{github.run_number}}

deploy-to-prod:

runs-on: ubuntu-latest
needs: deploy-to-test
environment:
name: prod
url: https://p5tgcusa4unsu-prod.azurewebsites.net/

steps:
- uses: actions/checkout@v3

- name: 'Login via Azure CLI'
uses: azure/[email protected]
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}

- uses: azure/webapps-deploy@v2
with:
app-name: 'p5tgcusa4unsu-prod'
images: p5tgcusa4unsumpnpreg.azurecr.io/techexcel/dotnetcoreapp:${{github.run_number}}
29 changes: 29 additions & 0 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net

name: .NET

on:
push:
branches: [ "main" ]
paths: src/Application/**
pull_request:
branches: [ "main" ]
paths: src/Application/**

workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore ./src/Application/src/RazorPagesTestSample/RazorPagesTestSample.csproj
- name: Build
run: dotnet build --no-restore ./src/Application/src/RazorPagesTestSample/RazorPagesTestSample.csproj
- name: Test
run: dotnet test --no-build --verbosity normal ./src/Application/tests/RazorPagesTestSample.Tests/RazorPagesTestSample.Tests.csproj
22 changes: 22 additions & 0 deletions .github/workflows/firstWF.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: First Workflow

on:
issues:

jobs:
job1:
runs-on: ubuntu-latest
steps:
- name: Echo Step 1
run: echo "This is Step 1"
- name: Echo Step 2
run: echo "This is Step 2"

job2:
runs-on: ubuntu-latest
steps:
- name: Cowsays
uses: mscoutermarsh/cowsays-action@master
with:
text: "Ready for prod LOL"
color: "mangenta"
62 changes: 0 additions & 62 deletions .github/workflows/pages.yml

This file was deleted.

4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@

.DS_Store

# Local configuration file for developers
src/Application/src/RazorPagesTestSample/config.json

6 changes: 6 additions & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# CODEOWNERS file
# This file designates code owners for specific directories or files
* @fwickert

# fwickert owns the /src/Application/ directory
/src/Application/ @fwickert
4 changes: 1 addition & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,11 @@ GEM
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
rexml (3.3.6)
strscan
rexml (3.3.9)
rouge (4.0.0)
safe_yaml (1.0.5)
sassc (2.4.0)
ffi (~> 1.9)
strscan (3.1.0)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
unicode-display_width (2.3.0)
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,5 @@ trademarks or logos is subject to and must follow
[Microsoft's Trademark & Brand Guidelines](https://www.microsoft.com/legal/intellectualproperty/trademarks/usage/general).
Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship.
Any use of third-party trademarks or logos are subject to those third-party's policies.

Update for testing
Loading
Loading