File tree Expand file tree Collapse file tree 12 files changed +2573
-0
lines changed Expand file tree Collapse file tree 12 files changed +2573
-0
lines changed Original file line number Diff line number Diff line change 1+ # https://help.github.com/en/categories/automating-your-workflow-with-github-actions
2+
3+ name : " Build"
4+
5+ on :
6+ pull_request :
7+ push :
8+ branches :
9+ - " main"
10+
11+ jobs :
12+ tests :
13+ name : " Tests"
14+
15+ runs-on : " ubuntu-latest"
16+
17+ strategy :
18+ matrix :
19+ dependencies : ["lowest", "highest"]
20+ php-version :
21+ - " 8.1"
22+ - " 8.2"
23+ - " 8.3"
24+
25+ steps :
26+ - name : " Checkout"
27+ uses : " actions/checkout@v3"
28+
29+ - name : " Install PHP"
30+ uses : " shivammathur/setup-php@v2"
31+ with :
32+ coverage : " none"
33+ php-version : " ${{ matrix.php-version }}"
34+ extensions : mbstring
35+
36+ - name : " Cache dependencies"
37+ uses : " actions/cache@v2"
38+ with :
39+ path : " ~/.composer/cache"
40+ key : " php-${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}"
41+ restore-keys : " php-${{ matrix.php-version }}-composer-"
42+
43+ - name : " Install lowest dependencies"
44+ if : ${{ matrix.dependencies == 'lowest' }}
45+ run : " composer update --prefer-lowest --prefer-dist --no-interaction --no-progress --no-suggest"
46+
47+ - name : " Install highest dependencies"
48+ if : ${{ matrix.dependencies == 'highest' }}
49+ run : " composer update --prefer-dist --no-interaction --no-progress --no-suggest"
50+
51+ - name : " Code Style"
52+ run : " vendor/bin/phpcs"
53+
54+ - name : " Static Analysis"
55+ run : " vendor/bin/phpstan analyze"
56+
57+ - name : " Tests"
58+ run : " vendor/bin/phpunit"
Original file line number Diff line number Diff line change 1+ name : Code Coverage
2+
3+ on :
4+ pull_request : null
5+ push :
6+ branches :
7+ - main
8+
9+ jobs :
10+ code_coverage :
11+
12+ runs-on : ubuntu-latest
13+ steps :
14+ - uses : actions/checkout@v3
15+ - uses : shivammathur/setup-php@master
16+ with :
17+ php-version : 8.2
18+ coverage : xdebug
19+ - name : Load dependencies from cache
20+ id : composer-cache
21+ run : |
22+ echo "::set-output name=dir::$(composer config cache-files-dir)"
23+ - uses : actions/cache@v1
24+ with :
25+ path : ${{ steps.composer-cache.outputs.dir }}
26+ key : ${{ runner.os }}-php8.2-composer-${{ hashFiles('**/composer.json') }}
27+ restore-keys : |
28+ ${{ runner.os }}-php8.2-composer-
29+
30+ - run : composer install --prefer-dist --no-progress --no-suggest
31+ - run : php vendor/bin/phpunit --coverage-clover build/logs/clover.xml
32+
33+ - uses : codecov/codecov-action@v3
34+ with :
35+ token : ${{ secrets.CODECOV_TOKEN }} # not required for public repos
36+ files : build/logs/clover.xml # optional
37+ flags : unittests # optional
38+ name : codecov-umbrella # optional
39+ fail_ci_if_error : true # optional (default = false)
40+ verbose : true # optional (default = false)
Original file line number Diff line number Diff line change 1+ # https://help.github.com/en/categories/automating-your-workflow-with-github-actions
2+
3+ name : " Release"
4+
5+ on :
6+ push :
7+ branches :
8+ - " main"
9+
10+ jobs :
11+ tests :
12+ name : " Create Release"
13+
14+ runs-on : " ubuntu-latest"
15+
16+ steps :
17+ - name : " Checkout"
18+ uses : " actions/checkout@v3"
19+
20+ - uses : " actions/setup-node@v3"
21+ with :
22+ node-version : ' lts/*'
23+
24+ - name : " Run semantic-release"
25+ env :
26+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
27+ run : npx semantic-release
Original file line number Diff line number Diff line change 1+ /.phpcs-cache
2+ /.phpunit.cache
3+ /vendor
Original file line number Diff line number Diff line change 1+ {
2+ "plugins": [
3+ "@semantic-release/commit-analyzer",
4+ "@semantic-release/release-notes-generator",
5+ "@semantic-release/github"
6+ ],
7+ "branches": [
8+ "main"
9+ ],
10+ tagFormat: '${version}',
11+ }
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " brainbits/phpcs-gitlab-report" ,
3+ "description" : " Output your PHP CodeSniffer report as a GitLab Code Quality report" ,
4+ "type" : " library" ,
5+ "keywords" : [
6+ " phpcs" ,
7+ " php-codesniffer" ,
8+ " phpcs-report" ,
9+ " gitlab" ,
10+ " code quality"
11+ ],
12+ "homepage" : " https://github.com/brainbits/phpcs-gitlab-report" ,
13+ "license" : " MIT" ,
14+ "authors" : [
15+ {
16+ "name" : " Satesh Persaud" ,
17+ 18+ "role" : " Developer"
19+ },
20+ {
21+ "name" : " Stephan Wentz" ,
22+ 23+ "role" : " Developer"
24+ }
25+ ],
26+ "support" : {
27+ "issues" : " https://github.com/brainbits/phpcs-gitlab-report/issues" ,
28+ "source" : " https://github.com/brainbits/phpcs-gitlab-report"
29+ },
30+ "require" : {
31+ "php" : " ^8.1" ,
32+ "ext-json" : " *" ,
33+ "squizlabs/php_codesniffer" : " ^3.9"
34+ },
35+ "require-dev" : {
36+ "phpunit/phpunit" : " ^10.0" ,
37+ "brainbits/phpcs-standard" : " ^7.0" ,
38+ "phpstan/phpstan" : " ^1.10" ,
39+ "phpstan/phpstan-phpunit" : " ^1.0"
40+ },
41+ "autoload" : {
42+ "psr-4" : {
43+ "Brainbits\\ Phpcs\\ " : " src"
44+ }
45+ },
46+ "autoload-dev" : {
47+ "psr-4" : {
48+ "Brainbits\\ Phpcs\\ Tests\\ " : " tests"
49+ }
50+ },
51+ "config" : {
52+ "allow-plugins" : {
53+ "dealerdirect/phpcodesniffer-composer-installer" : true
54+ }
55+ }
56+ }
You can’t perform that action at this time.
0 commit comments