-
Notifications
You must be signed in to change notification settings - Fork 38
82 lines (65 loc) · 2.7 KB
/
analyze.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: ✔ with code analysis
on:
push:
branches:
- main
- develop
- premerge/*
- pre-merge
jobs:
compute:
uses: ./.github/workflows/compute.yml
test:
uses: ./.github/workflows/test.yml
sonar:
name: '✔ with SonarCloud'
needs: [ compute, test ]
env:
php: ${{ fromJson(needs.compute.outputs.php-single) }}
typo3: ${{ fromJson(needs.compute.outputs.typo3-single) }}
if: github.repository == 'IchHabRecht/content_defender'
runs-on: ${{ fromJson(needs.compute.outputs.os-single) }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Download PHPUnit logs
uses: actions/download-artifact@v4
with:
path: .Log
pattern: phpunit-logs-*
merge-multiple: true
- name: Store Composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- uses: actions/cache/restore@v4
id: restore-composer-cache
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ env.typo3 }}-${{ env.php }}
restore-keys: |
${{ runner.os }}-composer-${{ env.typo3 }}-
${{ runner.os }}-composer-
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.php }}
extensions: mbstring, intl, pdo_sqlite, pdo_mysql
tools: composer:v2
- name: Environment Check
run: |
php --version
composer --version
find '.Log' -wholename '*.cov' | parallel --gnu 'echo ""; echo ""; echo "{}"; cat {}'
- name: Composer install
run: composer require --no-progress --no-suggest typo3/cms-core:"${{ env.typo3 }}" nimut/phpunit-merger
- name: Merging log and coverage files
run: |
.Build/bin/phpunit-merger coverage .Log/coverage/ .Log/coverage.xml;
.Build/bin/phpunit-merger log .Log/junit/ .Log/junit.xml;
- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}