Skip to content

Commit

Permalink
ci: change ci workflow to tests, configure sonar cloud
Browse files Browse the repository at this point in the history
  • Loading branch information
nuldark committed Mar 3, 2024
1 parent 986d48a commit b5a6825
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: "Continuous Integration"
name: "Tests"

on:
pull_request:
branches:
- "*.x"
paths:
- .github/workflows/continuous-integration.yml
- .github/workflows/tests.yml
- composer.*
- src/**
- tests/**
Expand All @@ -14,7 +14,7 @@ on:
branches:
- "*.x"
paths:
- .github/workflows/continuous-integration.yml
- .github/workflows/tests.yml
- composer.*
- src/**
- tests/**
Expand Down Expand Up @@ -44,18 +44,16 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
coverage: none
php-version: '8.2'
tools: cs2pr
coverage: xdebug
php-version: {{ matrix.php-versions }}

- name: Install dependencies
uses: ramsey/composer-install@v2
uses: ramsey/composer-install@v3

- name: Coding standards
run: "composer run lint-check -- -q --no-colors --report=checkstyle | cs2pr"
- name: Run tests
run: vendor/bin/phpunit --colors=always --coverage-clover=coverage.xml

- name: Static Analysis
run: "composer run static-analysis"

- name: PHPUnit tests
run: "composer run test"
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ composer.lock
.phpunit.cache/
phpunit.xml
.phpcs-cache
phpcs.xml
phpcs.xml
coverage.xml
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

[![PHP Version Require](https://poser.pugx.org/charonlab/charon-container/require/php)](https://packagist.org/packages/charonlab/charon-container)
[![Latest Stable Version](https://poser.pugx.org/charonlab/charon-container/v/stable)](https://packagist.org/packages/charonlab/charon-container)
[![Continuous Integration](https://github.com/charonlab/charon-container/actions/workflows/continuous-integration.yml/badge.svg)](https://github.com/charonlab/charon-container/actions)
[![tests](https://github.com/charonlab/charon-container/actions/workflows/tests.yml/badge.svg)](https://github.com/charonlab/charon-container/actions)
[![static analysis](https://github.com/charonlab/charon-container/actions/workflows/static-analysis.yml/badge.svg)](https://github.com/charonlab/charon-container/actions)
[![Total Downloads](https://poser.pugx.org/charonlab/charon-container/downloads)](https://packagist.org/charonlab/charon-container)
[![License](https://poser.pugx.org/charonlab/charon-container/license.svg)](https://packagist.org/packages/charonlab/charon-container)

Expand Down

0 comments on commit b5a6825

Please sign in to comment.