Skip to content

Fix CI #88

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Mar 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 16 additions & 11 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
symfony-version: '5.4'
steps:
- name: Check out code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Enable coverage
if: ${{ matrix.php-version == '8.1' }}
Expand All @@ -73,7 +73,7 @@ jobs:

- name: Setup cache
id: cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
~/.composer
Expand Down Expand Up @@ -105,6 +105,11 @@ jobs:
- name: Tests
run: make test-unit && make test-functional

# Upload to codacy first as codecov action always remove coverage files despite move_coverage_to_trash at false
- name: Upload coverages to Codacy
if: ${{ env.COVERAGE_TYPE == 'xdebug' }}
run: ${{ env.CODACY_BIN }} report -r build/coverage-phpunit/unit.clover -r build/coverage-behat/clover.xml -r build/coverage-phpunit/functional.clover -t ${{ secrets.CODACY_PROJECT_TOKEN }} --partial

# See the reports at https://codecov.io/gh/yoanm/symfony-jsonrpc-http-server
- name: Upload unit tests coverage to codecov
if: ${{ env.COVERAGE_TYPE == 'xdebug' }}
Expand All @@ -114,6 +119,8 @@ jobs:
name: "unit-tests-${{ matrix.php-version }}-${{ matrix.symfony-version }}"
flags: "unit-tests,php-${{ matrix.php-version }},sf-${{ matrix.symfony-version }}"
fail_ci_if_error: true
move_coverage_to_trash: false
verbose: ${{ runner.debug == '1' }}

- name: Upload functional tests coverage to codecov
if: ${{ env.COVERAGE_TYPE == 'xdebug' }}
Expand All @@ -123,17 +130,15 @@ jobs:
name: "functional-tests-${{ matrix.php-version }}-${{ matrix.symfony-version }}"
flags: "functional-tests,php-${{ matrix.php-version }},sf-${{ matrix.symfony-version }}"
fail_ci_if_error: true

- name: Upload coverages to Codacy
if: ${{ env.COVERAGE_TYPE == 'xdebug' }}
run: ${{ env.CODACY_BIN }} report -r build/coverage-phpunit/unit.clover -r build/coverage-behat/clover.xml -r build/coverage-phpunit/functional.clover -t ${{ secrets.CODACY_PROJECT_TOKEN }} --partial
move_coverage_to_trash: false
verbose: ${{ runner.debug == '1' }}

static-checks:
name: Static checks
runs-on: ubuntu-latest
needs: [ tests ]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Setup PHP 8.1
uses: shivammathur/setup-php@v2
Expand All @@ -147,7 +152,7 @@ jobs:

- name: Setup cache
id: cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
~/.composer
Expand All @@ -171,7 +176,7 @@ jobs:
steps:
- name: Setup cache
id: cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
${{ env.CODACY_CACHE_PATH }}
Expand Down Expand Up @@ -213,7 +218,7 @@ jobs:

steps:
- name: Check out code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup PHP ${{ matrix.php-version }}
uses: shivammathur/setup-php@v2
Expand All @@ -227,7 +232,7 @@ jobs:

- name: Setup cache
id: cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
~/.composer
Expand Down