-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (38 loc) · 1.17 KB
/
code-analysis.yml
File metadata and controls
39 lines (38 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Code Analysis
on:
workflow_call:
env:
DOTNET_NOLOGO: true
defaults:
run:
shell: bash
jobs:
code-analysis:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6.0.2
- name: Setup .NET SDK
uses: actions/setup-dotnet@v5.2.0
with:
# Should match the version used in https://github.com/Particular/repo-integrity-action/blob/main/src/RepoIntegrityTests/RepoIntegrityTests.csproj
dotnet-version: 8.0.x
- name: Repo integrity tests
uses: Particular/repo-integrity-action@main
env:
PRIVATE_REPO: ${{ github.event.repository.private }}
AFFECTED_BRANCH: ${{ github.base_ref || github.ref_name }}
- name: Report warnings
if: ${{ always() }}
run: |
if [ -f code-analysis-warnings.md ]; then
cat code-analysis-warnings.md >> $GITHUB_STEP_SUMMARY
fi
- name: Upload warnings
if: ${{ always() }}
uses: actions/upload-artifact@v7.0.1
with:
name: code-analysis-warnings
path: code-analysis-warnings.md
if-no-files-found: ignore
retention-days: 30