Skip to content

Merge branch 'master' into develop #748

Merge branch 'master' into develop

Merge branch 'master' into develop #748

Workflow file for this run

name: Framework Tests (Matrix)
on:
push:
branches: ["master", "develop"]
pull_request:
branches: ["master", "develop"]
jobs:
run-tests:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
php: [8.1, 8.2]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: shivammathur/setup-php@16011a795d747d5f45038f96371c3b98aec5669d
with:
php-version: ${{ matrix.php }}
extensions: fileinfo, zip
- name: Echo GitHub ref
run: echo ${{ github.ref }}
- name: Install Hyde (master)
if: "github.ref == 'refs/heads/master'"
run: git clone -b master https://github.com/hydephp/hyde.git
- name: Install Hyde (develop)
if: "github.ref != 'refs/heads/master'"
run: git clone -b develop https://github.com/hydephp/hyde.git
- name: Require latest framework version
if: "github.ref == 'refs/heads/master'"
run: cd hyde && composer require hyde/framework:dev-master hyde/testing:dev-master
- name: Require latest development framework version
if: "github.ref == 'refs/heads/develop'"
run: cd hyde && composer require hyde/framework:dev-develop hyde/testing:dev-master
- name: Require pull request framework version
if: "github.ref != 'refs/heads/master' && github.ref != 'refs/heads/develop'"
run: cd hyde && composer require hyde/framework:dev-${{ github.head_ref }} hyde/testing:dev-master
- name: Copy over test files
run: cp -r ./tests/. ./hyde/tests
- name: Download test runner configuration
run: cd hyde && curl https://github.com/raw/hydephp/develop/master/packages/hyde/phpunit.xml.dist -o phpunit.xml.dist
- name: Set environment to testing
run: cd hyde && echo "ENV=testing" > .env
- name: Execute tests (Unit and Feature tests) via PHPUnit/Pest
run: cd hyde && vendor/bin/pest --log-junit report.xml
env:
ENV: testing
- name: Ping statistics server with test results
run: |
cd hyde
curl https://github.com/raw/hydephp/develop/6e9d17f31879f4ccda13a3fec4029c9663bccec0/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php
php ping.php "Framework CI Matrix" ${{ secrets.OPENANALYTICS_TOKEN }}