generated from Ed-Fi-Exchange-OSS/Template-for-GitHub
-
Notifications
You must be signed in to change notification settings - Fork 3
57 lines (47 loc) · 1.85 KB
/
on-pullrequest-cs.yml
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# SPDX-License-Identifier: Apache-2.0
# Licensed to the Ed-Fi Alliance under one or more agreements.
# The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0.
# See the LICENSE and NOTICES files in the project root for more information.
name: On Pull Request - C#
on:
pull_request:
branches:
- main
paths:
- "**/*.cs"
- "**/*.csproj"
- ".github/workflows/on-pullrequest-cs.yml"
workflow_dispatch:
jobs:
scan-actions-bidi:
name: Scan Actions, scan all files for BIDI Trojan Attacks
uses: ed-fi-alliance-oss/ed-fi-actions/.github/workflows/repository-scanner.yml@main
run-cs-tests:
name: Run C# Tests
runs-on: ubuntu-latest
defaults:
run:
working-directory: src
shell: pwsh
steps:
- name: Checkout the Repo
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Setup .NET
uses: actions/setup-dotnet@607fce577a46308457984d59e4954e075820f10a # v3.0.3
with:
global-json-file: src/global.json
- name: Dependency Review ("Dependabot on PR")
uses: actions/dependency-review-action@7bbfa034e752445ea40215fff1c3bf9597993d3f # v3.1.3
- name: Initialize CodeQL
if: success()
uses: github/codeql-action/init@df32e399139a3050671466d7d9b3cbacc1cfd034 # codeql-bundle-v2.15.2
with:
languages: csharp
# Must build the software after initialization of CodeQL; something about
# CodeQL initialization causes the resulting build to fail unit tests.
# Therefore rebuilding here, even though also built above.
- name: Build for CodeQL
run: dotnet build webapi --nologo
- name: Perform CodeQL Analysis
if: success()
uses: github/codeql-action/analyze@df32e399139a3050671466d7d9b3cbacc1cfd034 # codeql-bundle-v2.15.2