Skip to content

Commit 122d1cf

Browse files
committed
Use Node.js v20, update dependencies
1 parent b8d80cb commit 122d1cf

File tree

10 files changed

+2491
-1389
lines changed

10 files changed

+2491
-1389
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
build:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v3
14+
- uses: actions/checkout@v4
1515
- run: |
1616
npm install
1717
- run: |

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535

3636
steps:
3737
- name: Checkout repository
38-
uses: actions/checkout@v3
38+
uses: actions/checkout@v4
3939

4040
# Initializes the CodeQL tools for scanning.
4141
- name: Initialize CodeQL

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
test:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v3
14+
- uses: actions/checkout@v4
1515
- run: |
1616
npm install
1717
- run: |

README.md

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This action enables you to run code analysis with Parasoft C/C++test Standard an
88

99
Parasoft C/C++test uses a comprehensive set of analysis techniques, including pattern-based static analysis, dataflow analysis, metrics, code coverage, unit testing, and more, to help you verify code quality and ensure compliance with industry standards, such as MISRA, AUTOSAR, and CERT.
1010
- Request [a free trial](https://www.parasoft.com/products/parasoft-c-ctest/try/) to receive access to Parasoft C/C++test's features and capabilities.
11-
- See the [user guide](https://docs.parasoft.com/display/CPPTEST20231) for information about Parasoft C/C++test's capabilities and usage.
11+
- See the [user guide](https://docs.parasoft.com/display/CPPTEST20241) for information about Parasoft C/C++test's capabilities and usage.
1212

1313
Please visit the [official Parasoft website](http://www.parasoft.com) for more information about Parasoft C/C++test and other Parasoft products.
1414

@@ -35,12 +35,12 @@ We recommend that you run Parasoft C/C++test on a self-hosted rather than GitHub
3535
### Adding the Run C/C++test Action to a GitHub Workflow
3636
Add the `Run C/C++test` action to your workflow to launch code analysis with Parasoft C/C++test.
3737

38-
Depending on the project type and the build system you are using (Make, CMake, etc.), you may need to adjust the workflow to collect the required input data for C/C++test. See the [C/C++test User Guide](https://docs.parasoft.com/display/CPPTEST20231/Running+Static+Analysis+1) for details.
38+
Depending on the project type and the build system you are using (Make, CMake, etc.), you may need to adjust the workflow to collect the required input data for C/C++test. See the [C/C++test User Guide](https://docs.parasoft.com/display/CPPTEST20241/Running+Static+Analysis+1) for details.
3939

4040
```yaml
4141
# Runs code analysis with C/C++test.
4242
- name: Run C/C++test
43-
uses: parasoft/run-cpptest-action@2.0.1
43+
uses: parasoft/run-cpptest-action@2.0.2
4444
with:
4545
input: build/compile_commands.json
4646
testConfig: 'builtin://MISRA C 2012'
@@ -57,7 +57,7 @@ To upload the SARIF report to GitHub, modify your workflow by adding the `upload
5757
# Uploads analysis results in the SARIF format, so that they are displayed as GitHub code scanning alerts.
5858
- name: Upload results (SARIF)
5959
if: always()
60-
uses: github/codeql-action/upload-sarif@v2
60+
uses: github/codeql-action/upload-sarif@v3
6161
with:
6262
sarif_file: reports/report.sarif
6363
```
@@ -68,7 +68,7 @@ To upload reports in other formats, modify your workflow by adding the `upload-
6868
# Uploads an archive that includes all report files (.xml, .html, .sarif).
6969
- name: Archive reports
7070
if: always()
71-
uses: actions/upload-artifact@v3
71+
uses: actions/upload-artifact@v4
7272
with:
7373
name: CpptestReports
7474
path: reports/*.*
@@ -115,7 +115,7 @@ jobs:
115115
116116
# Checks out your repository under $GITHUB_WORKSPACE, so that your job can access it.
117117
- name: Checkout code
118-
uses: actions/checkout@v3
118+
uses: actions/checkout@v4
119119
120120
# Configures your CMake project. Be sure the compile_commands.json file is created.
121121
- name: Configure project
@@ -128,7 +128,7 @@ jobs:
128128
# Runs code analysis with C/C++test.
129129
- name: Run C/C++test
130130
# Use the 'run-cpptest-action' GitHub action.
131-
uses: parasoft/run-cpptest-action@2.0.1
131+
uses: parasoft/run-cpptest-action@2.0.2
132132
# Optional parameters for 'run-cpptest-action'.
133133
with:
134134
# For CMake-based projects, use a compile_commands.json file as the input for analysis.
@@ -140,14 +140,14 @@ jobs:
140140
# Uploads analysis results in the SARIF format, so that they are displayed as GitHub code scanning alerts.
141141
- name: Upload results (SARIF)
142142
if: always()
143-
uses: github/codeql-action/upload-sarif@v2
143+
uses: github/codeql-action/upload-sarif@v3
144144
with:
145145
sarif_file: reports/report.sarif
146146
147147
# Uploads an archive that includes all report files (.xml, .html, .sarif).
148148
- name: Archive reports
149149
if: always()
150-
uses: actions/upload-artifact@v3
150+
uses: actions/upload-artifact@v4
151151
with:
152152
name: CpptestReports
153153
path: reports/*.*
@@ -192,7 +192,7 @@ jobs:
192192
193193
# Checks out your repository under $GITHUB_WORKSPACE, so that your job can access it.
194194
- name: Checkout code
195-
uses: actions/checkout@v3
195+
uses: actions/checkout@v4
196196
197197
# Builds your Make project using 'cpptesttrace' to collect input data for code analysis.
198198
# Be sure 'cpptesttrace' is available on $PATH.
@@ -202,7 +202,7 @@ jobs:
202202
# Runs code analysis with C/C++test.
203203
- name: Run C/C++test
204204
# Use the 'run-cpptest-action' GitHub action.
205-
uses: parasoft/run-cpptest-action@2.0.1
205+
uses: parasoft/run-cpptest-action@2.0.2
206206
# Uncomment if you are using C/C++test 2020.2 to generate a SARIF report:
207207
# with:
208208
# reportFormat: xml,html,custom
@@ -211,14 +211,14 @@ jobs:
211211
# Uploads analysis results in the SARIF format, so that they are displayed as GitHub code scanning alerts.
212212
- name: Upload results (SARIF)
213213
if: always()
214-
uses: github/codeql-action/upload-sarif@v2
214+
uses: github/codeql-action/upload-sarif@v3
215215
with:
216216
sarif_file: reports/report.sarif
217217
218218
# Uploads an archive that includes all report files (.xml, .html, .sarif).
219219
- name: Archive reports
220220
if: always()
221-
uses: actions/upload-artifact@v3
221+
uses: actions/upload-artifact@v4
222222
with:
223223
name: CpptestReports
224224
path: reports/*.*
@@ -227,7 +227,7 @@ jobs:
227227
## Configuring Analysis with C/C++test
228228
You can configure analysis with Parasoft C/C++test in the following ways:
229229
- By customizing the `Run C/C++test` action directly in your GitHub workflow. See [Action Parameters](#action-parameters) for a complete list of available parameters.
230-
- By configuring options in Parasoft C/C++test tool. We recommend creating a `cpptestcli.properties` file that includes all the configuration options and adding the file to C/C++test's working directory - typically, the root directory of your repository. This allows C/C++test to automatically read all the configuration options from that file. See [Parasoft C/C++test User Guide](https://docs.parasoft.com/display/CPPTEST20231/Configuration+1) for details.
230+
- By configuring options in Parasoft C/C++test tool. We recommend creating a `cpptestcli.properties` file that includes all the configuration options and adding the file to C/C++test's working directory - typically, the root directory of your repository. This allows C/C++test to automatically read all the configuration options from that file. See [Parasoft C/C++test User Guide](https://docs.parasoft.com/display/CPPTEST20241/Configuration+1) for details.
231231

232232
### Examples
233233
This section includes practical examples of how the `Run C/C++test` action can be customized directly in the YAML file of your workflow.
@@ -237,35 +237,35 @@ If `cpptestcli` executable is not on `$PATH`, you can configure the path to the
237237

238238
```yaml
239239
- name: Run C/C++test
240-
uses: parasoft/run-cpptest-action@2.0.1
240+
uses: parasoft/run-cpptest-action@2.0.2
241241
with:
242242
installDir: '/opt/parasoft/cpptest'
243243
```
244244

245245
#### Defining the Scope of Analysis
246-
You can configure the `input` parameter to provide the path to a file that defines the scope of analysis (includes a list of source files and compile commands). This parameter depends on the project type and the build system you are using. See the [C/C++test User Guide](https://docs.parasoft.com/display/CPPTEST20231/Running+Static+Analysis+1) for details.
246+
You can configure the `input` parameter to provide the path to a file that defines the scope of analysis (includes a list of source files and compile commands). This parameter depends on the project type and the build system you are using. See the [C/C++test User Guide](https://docs.parasoft.com/display/CPPTEST20241/Running+Static+Analysis+1) for details.
247247
```yaml
248248
- name: Run C/C++test
249-
uses: parasoft/run-cpptest-action@2.0.1
249+
uses: parasoft/run-cpptest-action@2.0.2
250250
with:
251251
input: 'build/compile_commands.json'
252252
```
253253

254254
#### Configuring a C/C++test Test Configuration
255-
Code analysis with C/C++test is performed by using a test configuration - a set of static analysis rules that enforce best coding practices or compliance guidelines. Parasoft C/C++test ships with a wide range of [built-in test configurations](https://docs.parasoft.com/display/CPPTEST20231/Built-in+Test+Configurations).
255+
Code analysis with C/C++test is performed by using a test configuration - a set of static analysis rules that enforce best coding practices or compliance guidelines. Parasoft C/C++test ships with a wide range of [built-in test configurations](https://docs.parasoft.com/display/CPPTEST20241/Built-in+Test+Configurations).
256256
To specify a test configuration directly in your workflow, add the `testConfig` parameter to the `Run C/C++test` action and specify the URL of the test configuration you want to use:
257257
```yaml
258258
- name: Run C/C++test
259-
uses: parasoft/run-cpptest-action@2.0.1
259+
uses: parasoft/run-cpptest-action@2.0.2
260260
with:
261261
testConfig: 'builtin://MISRA C 2012'
262262
```
263263

264264
#### Configuring a C/C++test Compiler Configuration
265-
In order to run analysis, C/C++test needs to be configured for a specific compiler. You need to specify the configuration that matches your compiler with the `compilerConfig` parameter. See [Supported Compilers](https://docs.parasoft.com/display/CPPTEST20231/Supported+Compilers) for information about supported compilers.
265+
In order to run analysis, C/C++test needs to be configured for a specific compiler. You need to specify the configuration that matches your compiler with the `compilerConfig` parameter. See [Supported Compilers](https://docs.parasoft.com/display/CPPTEST20241/Supported+Compilers) for information about supported compilers.
266266
```yaml
267267
- name: Run C/C++test
268-
uses: parasoft/run-cpptest-action@2.0.1
268+
uses: parasoft/run-cpptest-action@2.0.2
269269
with:
270270
compilerConfig: 'clang_10_0'
271271
```
@@ -274,7 +274,7 @@ In order to run analysis, C/C++test needs to be configured for a specific compil
274274
Generating reports in the SARIF format is available in C/C++test since version 2021.1. If you are using an earlier C/C++test version, you need to customize the `Run C/C++test` action to enable generating SARIF reports:
275275
```yaml
276276
- name: Run C/C++test
277-
uses: parasoft/run-cpptest-action@2.0.1
277+
uses: parasoft/run-cpptest-action@2.0.2
278278
with:
279279
reportFormat: xml,html,custom
280280
additionalParams: '-property report.custom.extension=sarif -property report.custom.xsl.file=${PARASOFT_SARIF_XSL}'
@@ -321,7 +321,7 @@ This section describes how to customize the `Run C/C++test` action to run code a
321321
Use the `commandLinePattern` parameter to modify the command line for `cpptestcli` executable. The command line pattern depends on your project and the setup of the workspace. Example:
322322
```yaml
323323
- name: Run C/C++test
324-
uses: parasoft/run-cpptest-action@2.0.1
324+
uses: parasoft/run-cpptest-action@2.0.2
325325
with:
326326
# C/C++test workspace will be created in '../workspace'.
327327
# C/C++test will create a new project based on the provided .bdf file.
@@ -333,7 +333,7 @@ Note: The `compilerConfig` and `reportFormat` action parameters are not directly
333333
Create a `config.properties` file with additional configuration options for C/C++test Professional, such as reporting options, compiler configuration etc. Then pass the configuration file to `cpptestcli` with the `-localsettings config.properties` option:
334334
```yaml
335335
- name: Run C/C++test
336-
uses: parasoft/run-cpptest-action@2.0.1
336+
uses: parasoft/run-cpptest-action@2.0.2
337337
with:
338338
# C/C++test will use options from 'config.properties'.
339339
additionalParams: '-localsettings config.properties'

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,5 @@ inputs:
4141
required: false
4242
default: '${cpptestcli} -compiler "${compilerConfig}" -config "${testConfig}" -property report.format=${reportFormat} -report "${reportDir}" -module . -input "${input}" ${additionalParams}'
4343
runs:
44-
using: 'node16'
44+
using: 'node20'
4545
main: 'dist/index.js'

0 commit comments

Comments
 (0)