diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 9d66e53..754d695 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -3,7 +3,6 @@ name: static analysis on: push: branches: - - master - '*.x' pull_request: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 578351d..db431e1 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,13 +1,10 @@ -name: build +name: unit-tests on: push: branches: - - master - '*.x' pull_request: - schedule: - - cron: '0 0 * * *' jobs: tests: @@ -25,7 +22,6 @@ jobs: name: PHP ${{ matrix.php }} / ${{ matrix.deps }} - environment: Test steps: - name: Checkout code uses: actions/checkout@v4 @@ -49,13 +45,6 @@ jobs: - name: Execute tests run: vendor/bin/phpunit --coverage-clover build/logs/clover.xml --exclude-group flaky - - name: Coverage - if: ${{ matrix.php == '8.1' && matrix.deps == 'lowest' }} - shell: bash - env: - CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }} - run: bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r build/logs/clover.xml - - name: Store artifacts if: ${{ matrix.php == '8.1' && matrix.deps == 'lowest' }} uses: actions/upload-artifact@v4 diff --git a/.github/workflows/upload-to-codacy.yml b/.github/workflows/upload-to-codacy.yml new file mode 100644 index 0000000..a9a9411 --- /dev/null +++ b/.github/workflows/upload-to-codacy.yml @@ -0,0 +1,19 @@ +name: upload-coverage-to-codacy +on: + workflow_run: + workflows: ["unit-tests"] + types: + - completed + +jobs: + upload: + runs-on: ubuntu-latest + strategy: + fail-fast: true + name: upload-coverage + steps: + - name: Upload Coverage to Codacy + shell: bash + env: + CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }} + run: bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r build/logs/clover.xml \ No newline at end of file