-
Notifications
You must be signed in to change notification settings - Fork 2
53 lines (41 loc) · 1.23 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
51
52
53
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: 'Create environment file'
run: touch .env
- 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/\/extension\/adobe_vipm/\/home\/runner\/work\/swo-adobe-vipm-extension\/swo-adobe-vipm-extension\/adobe_vipm/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