summaryrefslogtreecommitdiff
path: root/.github/workflows/coverage.yml
blob: 6bdaf14a09391b8b3c1e73ebd7468f157eb6d2d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
push:
  branches: [ "main" ]
pull_request:
  branches: [ "main" ]
name: Coverage
jobs:
  coverage:
    name: Coverage
    runs-on: ubuntu-latest

    steps:
      - name: Checkout
        uses: actions/checkout@v2

      - name: Set up php 8.3
        uses: shivammathur/setup-php@v2
        with:
          php-version: "8.3"
          coverage: xdebug

      - name: Set-up Composer
        uses: php-actions/composer@v6

      - name: Run tests and collect coverage
        run: ./vendor/bin/phpunit tests --coverage-clover coverage.xml tests

      - name: Upload coverage reports to Codecov
        uses: codecov/codecov-action@v3
        env:
          CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}