Skip to content

Remove workflows when using the repository template #324

Remove workflows when using the repository template

Remove workflows when using the repository template #324

Workflow file for this run

# README: This workflow runs some tests intended to make sure that the package works smoothly.
# This file is not included when you install Hyde normally, however it is present
# when you create a project by using the GitHub template. Unless you want to
# contribute to the project, there's no reason for you to keep this file.
name: Hyde Tests
on:
push:
branches: [ "master", "develop" ]
pull_request:
branches: [ "master", "develop" ]
create:
jobs:
setup-template-repository:
runs-on: ubuntu-latest
name: Setup repository
steps:
- uses: actions/checkout@v3
- name: debug
run: |
echo ${{ github.event.repository.name }}
echo ${{ github.event.repository.full_name }}
echo ${{ github.event.repository.owner.login }}
echo ${{ github.event.repository.owner.name }}
echo ${{ github.event.repository.owner.type }}
exit 1
- name: Remove workflows from template repository
run: rm -rf .github/workflows
- name: Commit changed files
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "Setup repository"
hyde-tests-master:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
dependency-version: [composer, latest]
runs-on: ${{ matrix.os }}
name: Hyde tests - ${{ matrix.os }} (${{ matrix.dependency-version }})
if: github.ref == 'refs/heads/master' && github.event.repository.name == 'hydephp/hyde'
steps:
- uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
extensions: fileinfo
- uses: actions/checkout@v3
- name: Require latest version
if: matrix.dependency-version == 'latest'
run: composer require hyde/framework:master hyde/testing
- name: Install additional dependencies
if: matrix.dependency-version != 'latest'
run: composer require hyde/testing --dev
- name: Download test runner configuration
run: curl https://raw.githubusercontent.com/hydephp/develop/master/packages/hyde/phpunit.xml.dist -o phpunit.xml.dist
- name: Execute tests (Unit and Feature tests) via Pest
run: vendor/bin/pest
hyde-tests-develop:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
php: [8.1, 8.2]
runs-on: ${{ matrix.os }}
name: Hyde tests - ${{ matrix.os }} ${{ matrix.php }} (develop)
if: github.ref == 'refs/heads/develop' && github.event.repository.name == 'hydephp/hyde'
steps:
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: fileinfo, zip
- uses: actions/checkout@v3
- name: Require latest development version
run: composer require hyde/framework:dev-develop hyde/testing:dev-master
- name: Download test runner configuration
run: curl https://raw.githubusercontent.com/hydephp/develop/master/packages/hyde/phpunit.xml.dist -o phpunit.xml.dist
- name: Execute tests (Unit and Feature tests) via Pest
run: vendor/bin/pest