Skip to content

Commit

Permalink
test cdode cov
Browse files Browse the repository at this point in the history
  • Loading branch information
NishaSharma14 committed Feb 22, 2024
1 parent 6f4ba09 commit 21d1d81
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/code-cov-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name : Code-cov test

on:
push:
branches: [xyz]
branches: [code-cov]

env:
PROJECT_ID: ${{ secrets.GKE_PROJECT }}
Expand Down Expand Up @@ -33,13 +33,14 @@ jobs:
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v1

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv
coverage: pcov

- name: Install composer dependencies
run: |
Expand All @@ -61,13 +62,18 @@ jobs:
php artisan key:generate
php artisan migrate --seed
- name: Install pcov
run: |
apt-get update
apt-get -y install php-pcov
- name: Install front-end dependencies
run: |
npm install
npm run build
- name: Run tests and collect coverage
run: vendor/bin/phpunit --coverage-clover coverage.xml .
run: vendor/bin/phpunit --coverage-clover coverage.xml

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4-beta
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dev-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name : Setup, Build and Publish to Dev

on:
push:
branches: [code-cov]
branches: [xyz]

env:
PROJECT_ID: ${{ secrets.GKE_PROJECT }}
Expand Down

0 comments on commit 21d1d81

Please sign in to comment.