Skip to content

[DO_NOT_MERGE] test #34

[DO_NOT_MERGE] test

[DO_NOT_MERGE] test #34

Workflow file for this run

name: Coverage
permissions:
contents: write
pull-requests: write
on:
push:
branches:
- main
pull_request:
jobs:
Linux:
runs-on: ubuntu-latest
strategy:
matrix:
version: ['8.3']
type: ['cli', 'zts']
distro: ['bookworm']
outputs:
matrix: ${{ toJson(matrix) }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: "arm64,s390x"
- name: Setup buildx
uses: docker/setup-buildx-action@v3
- name: Build container
run: |
docker compose build --pull --no-cache --build-arg PLATFORM="linux/amd64" --build-arg IMAGE="php" --build-arg TAG="${{ matrix.version }}-${{ matrix.type }}-${{ matrix.distro }}"
- name: Test with gcov
run: |
docker compose run -v "$(pwd)/ext:/ext" --rm shell /bin/sh -c 'pskel test gcov && lcov --capture --directory "/ext" --output-file "/ext/lcov.info" --exclude "/usr/local/include/*" --exclude "third_party/*" && lcov --list "/ext/lcov.info"'
- name: Upload coverage to artifact
uses: actions/upload-artifact@v4
with:
name: coverage-${{ matrix.version }}-${{ matrix.type }}-${{ matrix.distro }}
path: ${{ github.workspace }}/ext/lcov.info
Coverage:
needs: [Linux]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download coverage artifacts
uses: actions/download-artifact@v4
- name: Merge coverages
run: |
sudo apt-get install -y "lcov"
LCOV_FILES="$(find . -name "lcov.info")"
CMD="$(which "lcov")"
for LCOV_FILE in ${LCOV_FILES}; do
CMD+=" -a ${LCOV_FILE}"
done
CMD+=" -o lcov.info"
echo "Merging coverages: ${LCOV_FILES}"
${CMD}
find . -type f
- name: Report coverage
uses: k1LoW/octocov-action@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
config: .github/octocov.yml