Skip to content

[4.x] Fix utility permissions not showing when using route caching #18237

[4.x] Fix utility permissions not showing when using route caching

[4.x] Fix utility permissions not showing when using route caching #18237

Workflow file for this run

name: Run Tests
on:
push:
pull_request:
schedule:
- cron: '0 0 * * *'
jobs:
php-tests:
runs-on: ${{ matrix.os }}
if: "!contains(github.event.head_commit.message, '[ci skip]')"
strategy:
matrix:
php: [8.0, 8.1, 8.2, 8.3]
laravel: [9.*, 10.*]
stability: [prefer-lowest, prefer-stable]
os: [ubuntu-latest]
include:
- os: windows-latest
php: 8.1
laravel: 9.*
stability: prefer-stable
- os: windows-latest
php: 8.1
laravel: 10.*
stability: prefer-stable
exclude:
- php: 8.0
laravel: 10.*
- php: 8.3
laravel: 9.*
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v1
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v36
with:
files: |
config
resources/lang
resources/users
resources/views
routes
src
tests
composer.json
phpunit.xml.dist
.github/workflows/tests.yml
**.php
- name: Determine whether tests should run
id: should-run-tests
if: steps.changed-files.outputs.any_modified == 'true' || github.event_name == 'schedule'
run: echo "result=true" >> $GITHUB_OUTPUT
- name: Update apt sources
if: steps.should-run-tests.outputs.result == 'true' && matrix.os == 'ubuntu-latest'
run: |
sudo apt-get check || sudo apt --fix-broken install -y
sudo apt-get update
- name: Install French Locale
if: steps.should-run-tests.outputs.result == 'true' && matrix.os == 'ubuntu-latest'
run: sudo apt-get install language-pack-fr
- name: Setup PHP
uses: shivammathur/setup-php@v2
if: steps.should-run-tests.outputs.result == 'true'
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
coverage: none
- name: Install dependencies
uses: nick-invision/retry@v2
if: steps.should-run-tests.outputs.result == 'true'
with:
timeout_minutes: 5
max_attempts: 5
command: |
composer require "illuminate/contracts:${{ matrix.laravel }}" --dev --no-interaction --no-update
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
- name: List Installed Dependencies
if: steps.should-run-tests.outputs.result == 'true'
run: composer show -D
- name: Execute tests
if: steps.should-run-tests.outputs.result == 'true'
run: vendor/bin/phpunit
js-tests:
runs-on: ubuntu-20.04
if: "!contains(github.event.head_commit.message, '[ci skip]')"
name: JavaScript tests
steps:
- name: Checkout code
uses: actions/checkout@v1
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v36
with:
files: |
**.{js,vue,ts}
package.json
- name: Determine whether tests should run
id: should-run-tests
if: steps.changed-files.outputs.any_modified == 'true' || github.event_name == 'schedule'
run: echo "result=true" >> $GITHUB_OUTPUT
- name: Install required npm version
if: steps.should-run-tests.outputs.result == 'true'
run: npm -g install npm@8.5.5
- name: Install dependencies
if: steps.should-run-tests.outputs.result == 'true'
run: npm ci
- name: Execute tests
if: steps.should-run-tests.outputs.result == 'true'
run: npm run test
slack:
name: Slack Notification
runs-on: ubuntu-20.04
needs: [php-tests, js-tests]
if: always()
steps:
- uses: technote-space/workflow-conclusion-action@v1
- name: Send Slack notification
uses: 8398a7/action-slack@v2
if: env.WORKFLOW_CONCLUSION == 'failure'
with:
status: failure
author_name: ${{ github.actor }}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}