Update to recommended two workflows for secure secret when uploadin (#399)

* Update to recommended two workflows for secure secret when uploadin

* Making depenant workflow work
This commit is contained in:
Eduardo Gulias Davis
2024-12-27 22:52:06 +01:00
committed by GitHub
parent 793eb01a3f
commit 1ed7ade52c
3 changed files with 20 additions and 13 deletions
-1
View File
@@ -3,7 +3,6 @@ name: static analysis
on:
push:
branches:
- master
- '*.x'
pull_request:
+1 -12
View File
@@ -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
+19
View File
@@ -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