Skip to content

Commit 542c23e

Browse files
authored
ci: lighten merge group runs (#1704)
1 parent 4247d71 commit 542c23e

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

.github/workflows/analysis.yml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ concurrency:
1717
jobs:
1818
codeql:
1919
name: CodeQL
20-
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
20+
if: ${{ ! github.event.pull_request.draft }}
2121
runs-on: ubuntu-22.04
2222
timeout-minutes: 5
2323
steps:
@@ -34,7 +34,7 @@ jobs:
3434
# https://github.com/marketplace/actions/aqua-security-trivy
3535
trivy:
3636
name: Trivy Security Scan
37-
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
37+
if: ${{ ! github.event.pull_request.draft }}
3838
runs-on: ubuntu-22.04
3939
timeout-minutes: 1
4040
steps:
@@ -56,7 +56,7 @@ jobs:
5656

5757
tests:
5858
name: Tests
59-
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
59+
if: ${{ ! github.event.pull_request.draft }}
6060
runs-on: ubuntu-22.04
6161
timeout-minutes: 5
6262
services:
@@ -76,13 +76,9 @@ jobs:
7676
dir: [backend, frontend]
7777
include:
7878
- dir: backend
79-
sonar_projectKey: quickstart-openshift_backend
8079
token: SONAR_TOKEN_BACKEND
81-
triggers: ('backend/')
8280
- dir: frontend
83-
sonar_projectKey: quickstart-openshift_frontend
8481
token: SONAR_TOKEN_FRONTEND
85-
triggers: ('frontend/')
8682
steps:
8783
- uses: bcgov-nr/action-test-and-analyse@v1.1.0
8884
with:
@@ -94,9 +90,17 @@ jobs:
9490
sonar_args: >
9591
-Dsonar.exclusions=**/coverage/**,**/node_modules/**,**/*spec.ts
9692
-Dsonar.organization=bcgov-sonarcloud
97-
-Dsonar.projectKey=${{ matrix.sonar_projectKey }}
93+
-Dsonar.projectKey=quickstart-openshift_${{ matrix.dir }}
9894
-Dsonar.sources=src
9995
-Dsonar.tests.inclusions=**/*spec.ts
10096
-Dsonar.javascript.lcov.reportPaths=./coverage/lcov.info
10197
sonar_token: ${{ secrets[matrix.token] }}
102-
triggers: ${{ matrix.triggers }}
98+
triggers: ('${{ matrix.dir }}/')
99+
100+
results:
101+
name: Results
102+
needs: [codeql, trivy, tests]
103+
runs-on: ubuntu-22.04
104+
timeout-minutes: 1
105+
steps:
106+
- run: echo "Success!"

0 commit comments

Comments
 (0)