Debian Codegraph @

.github/workflows/codeql-csharp-analysis.yml

raw
1 # Licensed to the Apache Software Foundation (ASF) under one or more
2 # contributor license agreements. See the NOTICE file distributed with
3 # this work for additional information regarding copyright ownership.
4 # The ASF licenses this file to You under the Apache License, Version 2.0
5 # (the "License"); you may not use this file except in compliance with
6 # the License. You may obtain a copy of the License at
7 #
8 # https://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15 # For most projects, this workflow file will not need changing; you simply need
16 # to commit it to your repository.
17
18 # You may wish to alter this file to override the set of languages analyzed,
19 # or to provide custom queries or build logic.
20
21 name: "CodeQL C#"
22
23 on:
24 push:
25 branches:
26 - main
27 pull_request:
28 # The branches below must be a subset of the branches above
29 branches:
30 - main
31 paths:
32 - .github/workflows/codeql-csharp-analysis.yml
33 - lang/csharp/**
34
35 concurrency:
36 group: ${{ github.workflow }}-${{ github.ref }}
37 cancel-in-progress: true
38
39 jobs:
40 analyze:
41 name: Analyze
42 runs-on: ubuntu-latest
43
44 strategy:
45 fail-fast: false
46 matrix:
47 # Override automatic language detection by changing the below list
48 # Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
49 language:
50 - csharp
51 # Learn more...
52 # https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
53
54 steps:
55 - name: Checkout repository
56 uses: actions/checkout@v5
57 with:
58 # We must fetch at least the immediate parents so that if this is
59 # a pull request then we can checkout the head.
60 fetch-depth: 2
61
62 # Install .NET SDKs
63 - name: Install .NET SDKs
64 uses: actions/setup-dotnet@v4
65 with:
66 dotnet-version: |
67 6.0.x
68 7.0.x
69 8.0.x
70
71 # Initializes the CodeQL tools for scanning.
72 - name: Initialize CodeQL
73 uses: github/codeql-action/init@v3
74 with:
75 languages: ${{ matrix.language }}
76 # If you wish to specify custom queries, you can do so here or in a config file.
77 # By default, queries listed here will override any specified in a config file.
78 # Prefix the list here with "+" to use these queries and those in the config file.
79 # queries: ./path/to/local/query, your-org/your-repo/queries@main
80 queries: +security-and-quality
81
82 # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
83 # If this step fails, then you should remove it and run the build manually (see below)
84 - name: Autobuild
85 uses: github/codeql-action/autobuild@v3
86
87 # â„šī¸ Command-line programs to run using the OS shell.
88 # 📚 https://git.io/JvXDl
89
90 # âœī¸ If the Autobuild fails above, remove it and uncomment the following three lines
91 # and modify them (or add more) to build your code if your project
92 # uses a compiled language
93
94 - name: Perform CodeQL Analysis
95 uses: github/codeql-action/analyze@v3