File tree 3 files changed +62
-1
lines changed
3 files changed +62
-1
lines changed Original file line number Diff line number Diff line change
1
+ name : release-please
2
+
1
3
on :
2
4
push :
3
5
branches :
4
6
- main
5
- name : release-please
7
+
8
+ concurrency :
9
+ group : ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
10
+ cancel-in-progress : true
11
+
6
12
jobs :
7
13
release-please :
8
14
runs-on : ubuntu-latest
Original file line number Diff line number Diff line change
1
+ name : tests
2
+
3
+ on :
4
+ pull_request :
5
+
6
+ concurrency :
7
+ group : ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
8
+ cancel-in-progress : true
9
+
10
+ jobs :
11
+ phpunit :
12
+ name : PHPUnit
13
+ runs-on : ubuntu-latest
14
+ timeout-minutes : 10
15
+ steps :
16
+ # Checkout the code
17
+ - name : Checkout Code
18
+
19
+
20
+ # Setup PHP
21
+ - name : Get PHP Version
22
+ run : |
23
+ echo "PHP_VERSION=$(cat composer.lock | jq -r '."platform-overrides".php')" >> $GITHUB_ENV
24
+ - name : Setup PHP
25
+ uses :
shivammathur/[email protected]
26
+ with :
27
+ php-version : ${{ env.PHP_VERSION }}
28
+
29
+ # Install dependencies
30
+ - name : Cache Composer dependencies
31
+
32
+ with :
33
+ path : vendor
34
+ key : ${{ runner.os }}-vendor-${{ hashFiles('**/composer.lock') }}
35
+ - name : Install dependencies
36
+ run : composer install --prefer-dist --no-scripts --ignore-platform-reqs
37
+
38
+ # Run tests
39
+ - name : Run Unit Tests
40
+ run : |
41
+ vendor/bin/phpunit --coverage-text --coverage-clover reports/coverage.xml
42
+
43
+ # SonarCloud
44
+ - name : SonarCloud Scan
45
+ uses : SonarSource/sonarcloud-github-action@master
46
+ env :
47
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
48
+ SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
Original file line number Diff line number Diff line change
1
+ sonar.projectKey =geekcell_php-ddd
2
+ sonar.organization =geekcell
3
+
4
+ sonar.sources =src
5
+ sonar.exclusions =tests/**
6
+ sonar.tests =tests
7
+ sonar.php.coverage.reportPaths =reports/coverage.xml
You can’t perform that action at this time.
0 commit comments