From b4f3ddb95eaa4fc35c9fc1be4eb961c276ec0b88 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Sun, 18 Apr 2021 20:44:46 +0800 Subject: [PATCH] wip Signed-off-by: Mior Muhammad Zaki --- .github/workflows/coveralls.yml | 49 +++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/coveralls.yml diff --git a/.github/workflows/coveralls.yml b/.github/workflows/coveralls.yml new file mode 100644 index 0000000..553a4a0 --- /dev/null +++ b/.github/workflows/coveralls.yml @@ -0,0 +1,49 @@ +name: coveralls + +on: + push: + pull_request: + +jobs: + tests: + runs-on: ${{ matrix.os }} + continue-on-error: ${{ matrix.experimental }} + strategy: + matrix: + os: + - "ubuntu-latest" + php: + - "7.3" + dependencies: + - "locked" + experimental: + - false + + name: PHP${{ matrix.php }} on ${{ matrix.os }} (${{ matrix.dependencies }}) + + steps: + - name: Checkout code + uses: actions/checkout@v1 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: dom, curl, libxml, mbstring, zip, pcntl, sqlite3, pdo_sqlite, bcmath, fileinfo + coverage: xdebug + + - name: Install dependencies + uses: "ramsey/composer-install@v1" + with: + dependency-versions: "${{ matrix.dependencies }}" + composer-options: "--prefer-dist" + + - name: Execute tests + run: vendor/bin/phpunit --coverage-clover build/logs/clover.xml + + - name: Upload coverage results to Coveralls + env: + COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + composer global require php-coveralls/php-coveralls + php-coveralls --coverage_clover=build/logs/clover.xml -v