Skip to content

Commit 4744482

Browse files
committed
Update CI workflow and CodeQL actions
1 parent ff24541 commit 4744482

File tree

2 files changed

+9
-35
lines changed

2 files changed

+9
-35
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,9 @@ on:
55
# manual trigger
66
workflow_dispatch:
77
inputs:
8-
ssh_debug_enabled:
8+
debug_enabled:
99
type: boolean
10-
description: 'Run the build/test with ssh debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
11-
required: false
12-
default: false
13-
debug_deployment:
14-
type: boolean
15-
description: 'Run the pipeline with debug deployment enabled'
10+
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
1611
required: false
1712
default: false
1813

@@ -66,7 +61,7 @@ jobs:
6661
strategy:
6762
fail-fast: false
6863
matrix:
69-
language: [ 'java' ]
64+
language: [ 'java', 'javascript' ]
7065
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
7166
# Use only 'java' to analyze code written in Java, Kotlin or both
7267
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
@@ -92,7 +87,7 @@ jobs:
9287
# runnning code scanning with CodeQL. Link to the documentation - https://docs.github.com/en/code-security/secure-coding/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning
9388
# first step is to initialize CodeQL
9489
- name: Initialize CodeQL
95-
uses: github/codeql-action/init@v3
90+
uses: github/codeql-action/init@v2
9691
with:
9792
languages: ${{ matrix.language }} # defining the language for the CodeQL analysis
9893
# debug: true # uncomment this line to enable debugging for CodeQL analysis step
@@ -107,11 +102,11 @@ jobs:
107102
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
108103
# If this step fails, then you should remove it and run the build manually (see below)
109104
- name: Autobuild
110-
uses: github/codeql-action/autobuild@v3
105+
uses: github/codeql-action/autobuild@v2
111106

112107
# performing Code Quality Analysis with CodeQL. Link to the documentation - https://docs.github.com/en/code-security/secure-coding/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning
113108
- name: Perform CodeQL Analysis
114-
uses: github/codeql-action/analyze@v3
109+
uses: github/codeql-action/analyze@v2
115110
with:
116111
category: "/language:${{matrix.language}}" # defining the language for the CodeQL analysis
117112
- uses: actions/upload-artifact@v3 # uploading the artifact to the GitHub Artifacts. Link to the documentation - https://docs.github.com/en/actions/guides/storing-workflow-data-as-artifacts
@@ -186,7 +181,7 @@ jobs:
186181
187182
- name: Setup tmate session
188183
uses: mxschmitt/action-tmate@v3
189-
if: ${{ github.event_name == 'workflow_dispatch' && inputs.ssh_debug_enabled }}
184+
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
190185

191186
# split-tests action - splits the tests into x number of groups
192187
# based on the total number of github-hosted runners and junit previous test results by time and line count.
@@ -195,7 +190,7 @@ jobs:
195190
id: split-tests
196191
name: Split tests
197192
with:
198-
glob: src/test/**/**/*.java # glob pattern to match the test files
193+
glob: src/test/**/**/**.java # glob pattern to match the test files
199194
split-total: ${{ env.total-runners }} # total number of github-hosted runners
200195
split-index: ${{ matrix.runner-index }} # current runner index
201196
junit-path: test_results/*xml # path to the junit test results with wildcards to match all the files
@@ -216,27 +211,6 @@ jobs:
216211
name: Test Results
217212
path: ./target/surefire-reports # path to the test results
218213
retention-days: 90 # retention period for the artifact in days. Link to the documentation - https://docs.github.com/en/actions/guides/storing-workflow-data-as-artifacts#about-workflow-artifact-retention
219-
220-
publish-test-results:
221-
needs: unit-parallel-tests
222-
runs-on: ubuntu-latest
223-
steps:
224-
- name: Checkout repository
225-
uses: actions/checkout@v3
226-
227-
- name: Download test results
228-
uses: actions/download-artifact@v2
229-
with:
230-
name: Test Results
231-
path: test_results
232-
233-
- name: Publish Test Results
234-
uses: dorny/[email protected]
235-
if: success() || failure()
236-
with:
237-
reporter: java-junit
238-
name: JUnit Test Results
239-
path: test_results/*.xml
240214

241215
build-and-publish-docker-image: # job to build the docker image and publish it to the GitHub Container Registry
242216
runs-on: ubuntu-latest # using the latest ubuntu runner
@@ -305,5 +279,4 @@ jobs:
305279
with:
306280
# with tag from the build-and-publish-docker-image job in the output_tags step
307281
image_tag: "${{ needs.build-and-publish-docker-image.outputs.image_tag }}"
308-
debug: "${{ github.event.inputs.debug_deployment }}"
309282
secrets: inherit

PD-462.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Hello World

0 commit comments

Comments
 (0)