From 1cf0e6ef07364b490b75db512014e2901833c887 Mon Sep 17 00:00:00 2001 From: Septian Hari <5935057+LIQRGV@users.noreply.github.com> Date: Wed, 30 Nov 2022 16:25:44 +0700 Subject: [PATCH] Add github action --- .github/workflows/ci.yaml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/ci.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..42e5c0c --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,38 @@ +name: CI + +on: + pull_request: + types: + - opened + - reopened + push: + branches: + - master + +jobs: + build-test: + runs-on: ubuntu-latest + + steps: + - name: Checkout Code + uses: actions/checkout@v2 + + - name: Install composer and dependencies + uses: php-actions/composer@v6 + + - name: PHPUnit Tests + uses: php-actions/phpunit@v3 + env: + XDEBUG_MODE: coverage + with: + bootstrap: vendor/autoload.php + configuration: phpunit.xml + php_extensions: xdebug + args: tests --coverage-clover ./coverage.xml + + - name: Upload to Codecov + uses: codecov/codecov-action@v2 + with: + token: ${{ secrets.CODE_COV_TOKEN }} + files: ./coverage.xml + verbose: true