Skip to content

Sharp 9

Sharp 9 #2053

Workflow file for this run

name: Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
- "9.0"
jobs:
# Unit tests back (phpunit)
laravel-tests:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- php: 8.2
env:
LARAVEL: 11.*
TESTBENCH: 9.*
- php: 8.3
env:
LARAVEL: 11.*
TESTBENCH: 9.*
env: ${{ matrix.env }}
steps:
- uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: mbstring, dom, fileinfo, mysql
- name: Setup locales
run: sudo locale-gen fr_FR.UTF-8
- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache composer dependencies
uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install Composer dependencies
run: |
composer require "laravel/framework:${LARAVEL}" "orchestra/testbench:${TESTBENCH}" --no-interaction --no-update
composer update --prefer-stable --prefer-dist --no-interaction
- name: Execute tests via Pest
run: ./vendor/bin/pest --parallel
# Front unit tests
# front-tests:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
#
# - name: Setup Node.js
# uses: actions/setup-node@v2
# with:
# node-version: '14'
#
# - name: Update NPM
# run: npm i -g npm@9
#
# - name: Install front dependencies
# run: npm ci
#
# - name: Run Front tests
# run: npm run test
# Front e2e tests
# e2e-tests:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
#
# - name: Setup Node.js
# uses: actions/setup-node@v2
# with:
# node-version: '14'
#
# - name: Update NPM
# run: npm i -g npm@9
#
# - name: Install sharp dependencies
# run: npm ci --production
#
# - name: Run E2E tests
# uses: cypress-io/github-action@v2
# with:
# command: npm run cy:run-ct
# working-directory: tests-e2e
# env: CI=true
#
# - uses: actions/upload-artifact@v4
# if: always()
# continue-on-error: true
# with:
# name: e2e-cypress-screenshots
# path: tests-e2e/cypress/screenshots
slack:
needs:
- laravel-tests
# - e2e-tests
if: failure() && github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- uses: 8398a7/[email protected]
with:
status: failure
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}