Skip to content

build(deps): bump shivammathur/setup-php from 2.31.0 to 2.31.1 #332

build(deps): bump shivammathur/setup-php from 2.31.0 to 2.31.1

build(deps): bump shivammathur/setup-php from 2.31.0 to 2.31.1 #332

Workflow file for this run

name: Tests
on:
pull_request:
paths:
- "**.php"
- ".github/workflows/test.yml"
- ".ci/docker-compose.yml"
- ".ci/ntfy-server.yml"
push:
branches: [main]
paths:
- "**.php"
- ".github/workflows/test.yml"
- ".ci/docker-compose.yml"
- ".ci/ntfy-server.yml"
permissions:
contents: read
jobs:
test:
name: PHPUnit
runs-on: ubuntu-22.04
env:
COMPOSE_FILE: .ci/docker-compose.yml
NTFY_URI: "http://127.0.0.1:8080"
HTTPBIN_URI: "http://127.0.0.1:8081"
steps:
- name: Checkout code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Setup PHP
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
with:
php-version: '8.1'
coverage: xdebug
extensions: mbstring
- name: Setup problem matchers for PHP
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
- name: Setup problem matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: "Validate composer.json and composer.lock"
run: "composer validate --strict"
- name: Install dependencies with composer
run: composer install --prefer-dist
- name: Start ntfy & httpbin docker containers
run: docker-compose up -d
- name: Test connections to docker containers
run: bash .ci/scripts/test-connections.sh
- name: Run phpunit
run: ./vendor/bin/phpunit --coverage-clover=coverage.xml
- name: Stop ntfy & httpbin docker docker containers
run: docker-compose down
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0
with:
token: ${{ secrets.CODECOV_TOKEN }}