-
Notifications
You must be signed in to change notification settings - Fork 2
50 lines (39 loc) · 1.11 KB
/
pr-build-merge.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: PR build and merge
on:
pull_request:
types: [opened, synchronize, reopened]
push:
branches:
- main
- "release/**"
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: 'Build test containers'
run: docker-compose build app_test
- name: 'Run validation & test'
run: docker-compose run --service-ports app_test
- name: 'Fix coverage paths for SonarCloud'
run: |
sed -i 's/\/swo\/swo\/mpt\/cli/\/github\/workspace\/swo\/mpt\/cli/g' coverage.xml
- name: 'Run SonarCloud Scan'
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- name: 'Run SonarQube Quality Gate check'
uses: sonarsource/sonarqube-quality-gate-action@master
timeout-minutes: 5
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- name: 'Stop containers'
if: always()
run: docker-compose down