Skip to content

Commit

Permalink
CHORE: add gh workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
krsriq committed Sep 27, 2023
1 parent ac6fd58 commit 69a074c
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 1 deletion.
31 changes: 31 additions & 0 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: "Code Coverage"

on:
push:
branches: [ "main" ,"switch-to-s2s-oauth-apps-tests"]
pull_request:
branches: [ "main" ,"switch-to-s2s-oauth-apps-tests"]

jobs:
code-coverage:

runs-on: "ubuntu-latest"

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
with:
coverage: xdebug
php-version: '8.1'

- name: Install dependencies
run: composer update --ansi --no-interaction --no-progress --optimize-autoloader

- name: Collect code coverage with PHPUnit
run: Packages/Libraries/phpunit/phpunit/phpunit --bootstrap Tests/UnitTestBootstrap.php --configuration Tests/phpunit.xml --colors=always --coverage-clover=.build/logs/clover.xml

- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v3
27 changes: 27 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: PHPUnit Tests

on:
push:
branches: [ "main" ,"switch-to-s2s-oauth-apps-tests"]
pull_request:
branches: [ "main" ,"switch-to-s2s-oauth-apps-tests"]

jobs:
run-tests:

runs-on: ubuntu-latest

steps:
- name: "Checkout code"
uses: actions/checkout@v4

- name: "Install PHP with extensions"
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'

- name: Install Dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist

- name: Execute tests via PHPUnit
run: composer test
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
[![Latest Stable Version](https://poser.pugx.org/codeq/zoom-api/v/stable)](https://packagist.org/packages/codeq/zoom-api)
[![License](https://poser.pugx.org/codeq/zoom-api/license)](LICENSE)
[![Code Coverage](https://codecov.io/gh/code-q-web-factory/CodeQ.ZoomApi/branch/switch-to-s2s-oauth-apps-tests/graph/badge.svg)](https://codecov.io/gh/code-q-web-factory/CodeQ.ZoomApi)


# CodeQ.ZoomApi

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@
"mikey179/vfsstream": "@stable"
},
"scripts": {
"test": "Packages/Libraries/phpunit/phpunit/phpunit --bootstrap /Users/GradinaruFelix/Sites/FlirtForschung/DistributionPackages/CodeQ.ZoomApi/Tests/UnitTestBootstrap.php --configuration /Users/GradinaruFelix/Sites/FlirtForschung/DistributionPackages/CodeQ.ZoomApi/Tests/phpunit.xml"
"test": "Packages/Libraries/phpunit/phpunit/phpunit --bootstrap Tests/UnitTestBootstrap.php --configuration Tests/phpunit.xml"
}
}

0 comments on commit 69a074c

Please sign in to comment.