From 2e17d9e94ff7f77e6c2ca2976b228955756f5e70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?ShaoBo=20Wan=28=E7=84=A1=E5=B0=98=29?= <756684177@qq.com> Date: Sat, 12 Oct 2024 21:04:11 +0800 Subject: [PATCH] Create php.yml --- .github/workflows/php.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/php.yml diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml new file mode 100644 index 0000000..8fed75f --- /dev/null +++ b/.github/workflows/php.yml @@ -0,0 +1,20 @@ +name: Workflow for Codecov example-php +on: [push, pull_request] +jobs: + run: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Set up php 8.1 + uses: shivammathur/setup-php@v2 + with: + php-version: '8.1' + - name: Install dependencies + run: composer self-update && composer install && composer dump-autoload + - name: Run tests and collect coverage + run: vendor/bin/phpunit --coverage-clover coverage.xml . + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v4 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }}