Skip to content

[6.x] Bump js-cookie from 3.0.5 to 3.0.7 (#14705) #32788

[6.x] Bump js-cookie from 3.0.5 to 3.0.7 (#14705)

[6.x] Bump js-cookie from 3.0.5 to 3.0.7 (#14705) #32788

Workflow file for this run

name: Run Tests
on:
push:
branches:
- master
- '*.x'
pull_request:
schedule:
- cron: '0 0 * * *'
permissions: {}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
php-tests:
runs-on: ${{ matrix.os }}
if: "!contains(github.event.head_commit.message, '[ci skip]')"
permissions:
contents: read
strategy:
matrix:
php: [8.3, 8.4, 8.5]
laravel: [12.*, 13.*]
stability: [prefer-lowest, prefer-stable]
os: [ubuntu-latest]
include:
- os: windows-latest
php: 8.5
laravel: 12.*
stability: prefer-stable
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@9426d40962ed5378910ee2e21d5f8c6fcbf2dd96 # v47.0.6
with:
files: |
config/**
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
echo "result=true" >> $env: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@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # v2
if: steps.should-run-tests.outputs.result == 'true'
with:
php-version: ${{ matrix.php }}
extensions: fileinfo, exif, gd, pdo, sqlite, pdo_sqlite
ini-values: short_open_tag=on
coverage: none
- name: Install dependencies
uses: nick-invision/retry@ad984534de44a9489a53aefd81eb77f87c70dc60 # v4.0.0
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-latest
if: "!contains(github.event.head_commit.message, '[ci skip]')"
permissions:
contents: read
name: JavaScript tests
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@9426d40962ed5378910ee2e21d5f8c6fcbf2dd96 # v47.0.6
with:
files: |
**/*.{js,vue,ts}
package.json
.github/workflows/tests.yml
- 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
echo "result=true" >> $env:GITHUB_OUTPUT
- name: Use Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
- name: Install dependencies
if: steps.should-run-tests.outputs.result == 'true'
run: npm ci
- name: Install Playwright browsers
if: steps.should-run-tests.outputs.result == 'true'
run: npx playwright install chromium
- name: Execute tests
if: steps.should-run-tests.outputs.result == 'true'
run: npm run test
env:
CI: true
LARAVEL_BYPASS_ENV_CHECK: 1
LANG: en_US.UTF-8
- name: Verify build succeeds
if: steps.should-run-tests.outputs.result == 'true'
run: npm run build
slack:
name: Slack Notification
runs-on: ubuntu-latest
needs: [php-tests, js-tests]
permissions:
actions: read # required by workflow-conclusion-action to determine overall workflow status
if: always()
steps:
- uses: technote-space/workflow-conclusion-action@45ce8e0eb155657ab8ccf346ade734257fd196a5 # v3
- name: Send Slack notification
uses: slackapi/slack-github-action@45a88b9581bfab2566dc881e2cd66d334e621e2c # v3.0.3
if: env.WORKFLOW_CONCLUSION == 'failure' && github.event_name == 'schedule'
with:
webhook: ${{ secrets.SLACK_WEBHOOK }}
webhook-type: incoming-webhook
payload: |
text: ":x: *${{ github.repository }}* tests failed"
blocks:
- type: section
text:
type: mrkdwn
text: ":x: *${{ github.repository }}* tests failed\n*Ref:* ${{ github.ref }}\n*Author:* ${{ github.actor }}\n*Workflow:* <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|${{ github.workflow }}>"