mirror of
https://github.com/egulias/EmailValidator.git
synced 2026-08-17 13:32:09 +00:00
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:
committed by
GitHub
parent
793eb01a3f
commit
1ed7ade52c
@@ -3,7 +3,6 @@ name: static analysis
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- '*.x'
|
||||
pull_request:
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user