Skip to content

Commit

Permalink
refactor naming conventions
Browse files Browse the repository at this point in the history
  • Loading branch information
DaveSkender committed Nov 8, 2023
1 parent 6d78f70 commit 0690b65
Show file tree
Hide file tree
Showing 5 changed files with 101 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,22 +1,26 @@
name: "CodeQL"
name: "build"
run-name: Test CodeQL

on:
push:
branches: ["main"]
paths:
- 'src/**'
- 'tests/**'

pull_request:
branches: ["main"]
paths:
- 'src/**'
- 'tests/**'
- ".github/workflows/build-codeql.yml"

schedule:
- cron: "16 12 * * 3"

jobs:
analyze:
name: analyze
name: test codeQL
runs-on: ubuntu-latest
permissions:
actions: read
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
branches: ["main"]
paths:
- "src/**"
- ".github/workflows/build-main.yml"
- ".github/workflows/build-package.yml"

jobs:
package:
Expand Down
84 changes: 84 additions & 0 deletions .github/workflows/build-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: "build"
run-name: Test indicators

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

pull_request:
branches: ["main"]
paths:
- "src/**"
- ".github/workflows/build-tests.yml"

jobs:

testing:
name: test indicators
runs-on: ubuntu-latest

steps:

- name: Checkout repository
uses: actions/checkout@v4

- name: Install .NET SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: "7.x"
dotnet-quality: "ga"

- name: Build solution
run: >
dotnet build
--configuration Release
--property:ContinuousIntegrationBuild=true
-warnAsError
- name: Test library
run: >
dotnet test
--configuration Release
--no-build
--verbosity normal
--logger trx
--collect:"XPlat Code Coverage"
--results-directory ./coverage
- name: Update PR tests summary
uses: bibipkins/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
results-path: ./coverage/**/*.trx
coverage-path: ./coverage/**/coverage.cobertura.xml
coverage-type: cobertura
coverage-threshold: 95

- name: Code coverage summary
uses: irongut/[email protected]
with:
filename: coverage/**/coverage.cobertura.xml
badge: true
thresholds: '95 98'
fail_below_min: true
format: markdown
hide_branch_rate: false
hide_complexity: false
indicators: true
output: both

- name: Update PR coverage summmary
uses: marocchino/sticky-pull-request-comment@v2
if: github.event_name == 'pull_request'
with:
recreate: true
path: code-coverage-results.md

- name: Save test results
uses: actions/upload-artifact@v3
with:
name: test-results
path: coverage
if: ${{ always() }}
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
name: test docs
name: docs
run-name: Test doc site URLs

on:
pull_request:
branches: [main]
paths:
- 'docs/**'
- ".github/workflows/docs-test-a11y.yml"

env:
JEKYLL_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
testing:
name: a11y
name: test a11y
runs-on: ubuntu-latest

steps:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
name: test docs
name: docs
run-name: Test doc site URLs

on:
pull_request:
branches: [main]
paths:
- 'docs/**'
- ".github/workflows/docs-test-links.yml"

env:
JEKYLL_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
testing:
name: URLs
name: test URLs
runs-on: ubuntu-latest

steps:
Expand Down

0 comments on commit 0690b65

Please sign in to comment.