Skip to content

Commit 6c36b62

Browse files
Update pull-request.yml
1 parent 9868a16 commit 6c36b62

1 file changed

Lines changed: 28 additions & 8 deletions

File tree

.github/workflows/pull-request.yml

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,42 @@ on:
55
types: [opened, synchronize, reopened]
66

77
jobs:
8-
pull_request:
8+
build:
99
runs-on: ubuntu-latest
10-
timeout-minutes: 5
10+
timeout-minutes: 10
1111

12-
permissions:
13-
contents: read
14-
packages: read
15-
pull-requests: write
12+
env:
13+
BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory
1614

1715
steps:
1816
- name: Checkout code
1917
uses: actions/checkout@v4
2018
with:
2119
fetch-depth: 0
2220

23-
- name: SonarCloud Scan
24-
uses: SonarSource/sonarcloud-github-action@master
21+
- name: Setup Node.js
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: 20
25+
26+
- name: Install node-gyp
27+
run: npm install -g node-gyp
28+
29+
- name: Install Build Wrapper
30+
uses: SonarSource/sonarqube-scan-action/install-build-wrapper@v5
31+
32+
- name: Run Build Wrapper
33+
run: build-wrapper-win-x86-64.exe --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} node-gyp configure build
34+
35+
- run: ls ${{ env.BUILD_WRAPPER_OUT_DIR }}
36+
- run: cat ${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json
37+
- run: cat ${{ env.BUILD_WRAPPER_OUT_DIR }}/build-wrapper.log
38+
- run: cat ${{ env.BUILD_WRAPPER_OUT_DIR }}/build-wrapper-dump.json
39+
40+
- name: SonarQube Scan
41+
uses: SonarSource/sonarqube-scan-action@v5
2542
env:
2643
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
44+
with:
45+
args: >
46+
--define sonar.cfamily.compile-commands="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"

0 commit comments

Comments
 (0)